Article From:

Baidu Encyclopedia Definition:

environment variable,An object with a specific name in the operating system contains information that one or more applications will use.

For example, path environment variables in Windows and DOS operating systems require the system to run a program without telling it the integrity of the program.

In addition to finding the program under the current directory, the system should also find the path specified in the path. By setting environment variables,

To better run the process.


That means the Java installation directory. This is a rule, whether it is oracle, Tomcat or other software that needs to use jdk, jrm, is to directly find the environment variable in the operating system.

For example, when you set path, “;% JAVA_HOME% bin” instead of “C: Program Files (x86) Java bin”. “% JAVA_HOME%” uses the JAVA_HOME environment variable。


The purpose is to specify the Java command search path. We need to add the bin directory in the JDK installation directory to the existing PATH variables. The bin directory contains frequently used executable files such as javac,

java、javawAfter setting the PATH variable, you can execute javac / Java and other tools in any directory.


He tells the Java execution environment in which directories you can find the classes or packages you need to execute Java programs.Popularly speaking, its function is related to import and package keywords. We

Written java source code, of course, will contain other people’s provided tool classes, such as when you write improt java. util. * when the compiler faces the import keyword, you need to know that you want to introduce java. util.

packageWhere exactly are the classes in. As above, if not told, he defaults to be in the current directory, and how to tell it? That is to set up CLASSPATH.

Leave a Reply

Your email address will not be published. Required fields are marked *