javac command not working in command prompt

C

chrisdude911

I will try JDK 5.0 Update 8 later when the site so busy that i cannot
download it
 
T

TechBookReport

chrisdude911 said:
That didn't work
What do you mean, 'does not work'? Are you getting compile errors, file
not found errors or something else? What platform are you on?

If you're running on Windows and are getting: 'javac' is not recognized
as an internal or external command, operable program or batch file.'
Then it's most likely a path issue.
 
C

chrisdude911

C:\Java>javac HelloWorldApp.java
'javac' is not recognized as an internal or external command,
operable program or batch file.

that is the message, i have put C:\Program
Files\JAVA\jdk1.5.0_08\bin\javac into the PATH but it is still not
working
 
T

TechBookReport

chrisdude911 said:
i also tried C:\Program Files\Java\jdk1.5.0_08\bin\
and that didn't work
OK, open a command prompt, navigate to the bin directory and just type
javac. If you get a screen full of options then there's nothing wrong
with the install. Also, try using the full path to the javac.exe in your
compile command.
 
C

chrisdude911

Don't Worry now
Simpe error i forgot to restart command prompt!
we learn a new thing every day!
Thanks
 
T

TrevorBoydSmith

to get windows/linux/etc etc to recognize a new command you have to
tell the OS where the command .exe is present. To do this you have to
change the environment variable. Search on google for: environment
variables java classpath

On windows --> control panel --> system --> advanced tab -->
environment variables button --> then you have to change both the
"path" and "classpath" environment variables

make sure to NOT delete the path environment variable or you are kinda
screwed.
 
Joined
Feb 4, 2009
Messages
1
Reaction score
0
Solving javac command not working in command prompt

Step 1:Get into Environment Variables. I hope you know how to find it.

Step 2:Find 4 variables below:-
a) classpath
b) include
c) lib
d) path

If you can't find it...just create it...and for it's value...let it empty for a while...

Step 3:Find location of your java.exe
For example : C:\Program Files\Java\jdk1.6.0\bin\java.exe

Step 4:Copy all word before java.exe
So, what i must copy is : C:\Program Files\Java\jdk1.6.0\bin\

Step 5:Get into Environment Variables again
Now, for each variables that i have listed...add word in parentheses (.;) at the beginning of their Variable value.If it empty, just add .; into it...

Step 6:For each Variable value in each 4 listed variables, add a semicolon(;) at the end and paste what you copy in Step 4.If ; exist, don't create it again...just paste what you copy in Step 4 after it...

Step 7:Now restart your computer and check if you still get the error message.

Step 8:If it still show the error message...get into Environment Variables again, go
to each 4 variables that i have listed...and add double quotes (") between all word that you copy in Step 4.
For example :
"C:\Program Files\Java\jdk1.6.0\bin\"

Step 9:Repeat Step 7
 
Joined
Mar 10, 2009
Messages
1
Reaction score
0
@ Carnado2008

Looks like the semicolon followed by the closing brace is converted into a smiley!!!
Anywayz ppl who are following this must be facing some difficulty understanding wat our friend carnado is saying..
The smiley's here are the SEMICOLON followed by CLOSING BRACE ..
So replace this smiley [;)] with a semicolon ';' followed by a ')'
And actualy even i had problem with JAVAC and the sol provided by carnado actually works!!
so cheers
srk289:)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,007
Latest member
obedient dusk

Latest Threads

Top