"Javac" doesn't work correctly on Windows 10

Sadôk picture Sadôk · Aug 10, 2015 · Viewed 145.2k times · Source

the problem is that I upgraded to Windows 10 and now I'm installing my tools to programming and now that I installed the JDK 7 of Java, when I try to use in the cmd the command: - "javac"

The result of this is: "javac" is not recognized as an internal or external command...

But I was edited the PATH with the correct link of jdk, because when I use "java", it is ok.

Now, I tried in the console with this command: PATH=%PATH%;"C:\Program Files\Java\jdk1.7.0_79\bin"

And when I executed the command "javac" it works, but now, when I open other console, it doesn't work, or when I restart the console, this command is not recognized.

What could be the problem?

Answer

SLaks picture SLaks · Aug 10, 2015

java is part of the JRE, not the JDK.

You need to add the JDK bin to the system PATH, in

"Control Panel" | System | Advanced | "Environment Variables"