---

How to set JAVA_HOME environment variable automatically on Linux

Many Java programs or Java-based IDE environments require JAVA_HOME environment variable being set. This environment variable is supposed to point to the top directory where the Java development kit (JDK) or Java runtime environment (JRE) is installed. The JDK contains everything the JRE offers, but also provides additional binaries and libraries needed to compile Java programs.

Get the Free Newsletter!

Subscribe to Developer Insider for top news, trends, & analysis