Skip to content

linux

3 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: command not found After Installing the JDK, Fixed

java: command not found means your shell searched every PATH directory and none had java in it. Why setting JAVA_HOME doesn't help, how to see what the shell sees, and the fix for Linux, macOS, sudo, cron and Docker.

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