Skip to content

path-variable

2 Posts

'java' is not recognized as an internal or external command

'java' is not recognized as an internal or external command means the window you typed in has a PATH with no java.exe on it. Why setting JAVA_HOME and reopening the same window doesn't fix it, and the fix for cmd, PowerShell and IDE terminals.

'javac' is not recognized but java -version works: the fix

'javac' is not recognized while java -version works means the java on your PATH belongs to a JRE or a launcher folder with no compiler next to it. How to prove it in two commands, and the fix for Windows, Linux, macOS and Docker.