running 'java -version' on my cmd prompt gives me the version of my JRE but when i run my programs as 'javac abc.java' it says 'javac' is not recognised as an internal or external command, operable program or batch file.

I have set the Path variable by appending C:\Program Files\Java\jre6\bin so that it looks like this :
rShell\v1.0;C:\Program Files\Enterpr
Imaging\;C:\Program Files\Common Fi
in;C:\Program Files\Java\jre6\bin"

What should i do?

3 Years
Discussion Span
Last Post by JamesCherrill

I could try all the suggestions over there but they don't work...
One query: Is the javac.exe same as javacpl.exe... (looks like javacpl.exe is the commpiler file but not sure.. just a guess from my side ) I am not able to find javac.exe in my bin folder but i can find javacpl.exe...


javac is part of the development kit, the JDK. It's not in the JRE,that's just the runtime environment.
Download the JDK - version 7 is the current major version

Edited by JamesCherrill


"I could try all the suggestions over there but they don't work"
and how do you know they don't work until you try? no, javac is not the same as javecpl. if, as you say, you don't have the JDK installed, as JamesCherrill points out.
both those links tell you to refer to the installed JDK, not the JRE, so trying them would have solved the issue. as I said: overlooking something basic is easily done.

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.