To use javac in cmd, the JDK must be installed on your system ...
javac will not work if you specify the bin folder inside the JRE (C: \ Program Files \ Java ** jre7 ** \ bin)
Please check javac.exe inside the bin folder (C: \ Program Files \ Java ** jdk1.7.0_45 ** \ bin)
javac.exe must be inside the JDK (C: \ Program Files \ Java \ jdk1.7.0_45 \ bin) not inside the JRE (C: \ Program Files (x86) \ Java \ jre7 \ bin) "The JRE does not come with the compiler. This just a Java runtime. You need a development kit. to use the javac compiler
For the javac path (indicates memorization when setting up the env variable of the system)
path = C: \ Program Files (x86) \ Java \ jre7 \ bin is incorrect
path = C: \ Program Files \ Java \ jdk1.7.0_45 \ bin is correct
Make sure that "javac.exe" must be inside "C: \ Program Files \ Java \ jdk1.7.0_45 \ bin"
Do not confuse with JRE and JDK both completely different
if you do not have JDK PLS download from this link http://www.oracle.com/technetwork/java/javase/downloads/jdk7-downloads-1880260.html
link for JDK VS JRE What is the difference between JDK and JRE?
Procedure: -
made
Now go and change the system environment variable path = C: \ Program Files \ Java \ jdk1.7.0_45 \ bin
it will set the path forever
source share