"Javac" doesn't work correctly on Windows 10
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"
Her's how I configure System variable on Windows 10 :
I am totally new to java and spent hours trying to get the problems with PATH and CLASSPATH worked out. There was one person who said to restart the command prompt after you modify the environment variables; that was it for me. While you are testing different configurations, make sure to relaunch the command prompt before testing. It seems like there are at least 2 different ways of setting this up. I went with the following:
1) In System Variables, add
JAVA_HOME = c:\program files (x86)\java\jdk1.8.0_121
2) In System Variables, add the following to existing Path...
%JAVA_HOME%\bin
That's it. No need for quotes around anything. No double forward slashes or anything else. I think it would also work if I removed the java_home variable and just listed the explicit path to bin in the PATH variable, but I'm not touching it again now that it finally works.