I. Causes of environmental variable construction
The development of Java programs is divided into three steps: Edit. Java source program, Javac tool compiles class file, Java tool runs class file. To facilitate the use of development tools (which can be used in any directory), environment variables are built. The environment is constantly changing, but it all works.
There are two kinds of environment variables, one is user variable, the other is system variable, and the environment variable we build is the system variable path. This defines the path for the use of the tool, which can be found in the defined path path when there are no tools in the current directory. This is based on the DOS command line principle, in the DOS Command Window Operation command Tool, the command tool will be found in two places: the current directory and the specified system path. If neither is found, the window prompts for commands that are not internal or external. The internal may refer to the current path, and the external may be the system path.
Environment variables are provided as an escape route that is not available in the current directory and can be found in environment variables. If found in an environment variable, you can continue to use the SET command. With this rule, we can use the commands we want in any folder, even if the command is not in the folder.
Two. Different types of environment variable configuration
Permanent, temporary, borrowed.
The above is about configuring a permanent environment variable on your own computer. The next discussion is about temporary and borrowed environment variables. The environment variables are referred to as the PATH environment variables, the permanent, temporary, borrowing is also path.
The specific implementation is operated by the SET command in the DOS command line and must be familiar to the set command. The borrowing operation is based on a temporary operation.
Java-Preliminary Understanding-Chapter I-Collocation of environment variables