Skip to content

environment-variables

2 Posts

How to Set JAVA_HOME on Windows, macOS and Linux (and Check It)

How to set JAVA_HOME so Maven, Gradle and your IDE all agree on one JDK: the exact path to use on Windows, macOS and Linux, why it vanishes in cron, sudo and CI, and the one command that proves it's right.

'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.