classpath: specify the class search path.
The environment variables that need to be configured under Windows are 'JAVA_HOME', 'path', and 'classpath'. $CLASSPATH in the terminal (Terminal), which contains the correct JDK path, then you can skip this step.Īfter the JDK is successfully installed, you need to configure the environment variables. If you have already configured the environment variables, enter echo $JAVA_HOME, echo $PATH, echo I entered these two commands in the terminal, as shown in the figure below, you can see that Java 8 has been successfully installed on this machine. Java - version # Check the JDK version / usr / libexec / java_home - V # List the JAVA_HOME of all JDK versions