JAVA_HOME and Path

JAVA_HOME and Path

** Environment variables ** are the bottleneck when you have to install Java on windows.

What are environment variables?

In Java, that information is stored in folders for each version. It's annoying to point to the hierarchy / Library / Java / JavaVirtualachine / jdk {version} / up to that point, so put it in a ** environment variable ** called JAVA_HOME or Path and handle it easily.

Often, "Path does not pass" means that the contents of environment variables are incorrect and you cannot go to the target hierarchy.

Difference between JAVA_HOME and Path

Both are environment variables. However, depending on the application, you can get Java information with JAVA_HOME and Java information with Path, so you should set both.

The following setting information. It is assumed that the JDK (Java) is installed in C: \ Program Files \ Java \ jdk1.8.0_101. Click here for detailed setting method (https://eng-entrance.com/java-install-env).

JAVA_HOME

JAVA_HOME = C:¥Program Files¥Java¥jdk1.8.0_101

Specify the directory where the JDK is installed

Path

Path = C:¥Program Files¥Java¥jdk1.8.0_101¥bin

The file that compiles and executes the Java source code is in \ bin, so specify that.

Articles that I used as a reference

Thank you very much. Are you doing it properly? How to set Java environment variables PATH setting and environment variable JAVA_HOME setting About JAVA_HOME

Recommended Posts

JAVA_HOME and Path
rails path and url methods
java.io.File exists () and current path
Don't set JAVA_HOME with full path
Notes on Java path and Package
== and equals
About JAVA_HOME
Java management and STS (Eclipse) build path settings