Javac is not recognized

Miroslav picture Miroslav · Sep 16, 2017 · Viewed 7.7k times · Source

Recently I started a fresh install of windows 10, however javac seemed to stop working.

    C:\WINDOWS\system32>javac -version
'javac' is not recognized as an internal or external command,
operable program or batch file.

Here is a screenshot of my path: enter image description here

Thanks! Please tell me if you have the solution.

Answer

Monkey Supersonic picture Monkey Supersonic · Sep 16, 2017

Make once again sure that javac is in the PATH that is set for your shell. Watch the output of echo %PATH%. I bet JDK's bin directory is not listed there.

If you set the PATH via System Settings in Windows, you have to close and re-open the terminal to make the changes take effect.

EDIT: Also remove the semikolon from the path to the JDK. Then it should work.