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 :
"C:\WINDOWS\system32;C:\WINDOWS;C:\WI
IBRV\BIN;C:\Program Files\TIBCO\TIBR
rShell\v1.0;C:\Program Files\Enterpr
Imaging\;C:\Program Files\Common Fi
in;C:\Program Files\Java\jre6\bin"

What should i do?

Recommended Answers

All 6 Replies

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

"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.

My bad... i didn't figured out it was JDK...

If it's OK now please mark this solved for our knowledge base

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.