1. View all the environment variables currently available (= system variable user variable)
set
View a environment variable, such as Path
SET PATH
Add environment variables, such as xxx = aa
SET XXX = AA
Place the value of environment variables (such as xxx) empty
SET XXX =
Add a new value after an environment variable (such as PATH) (such as D: / XXX)
SET PATH =% PATH%; D: / XXX
(Note: In the DOS window, the operation of the environment variable in the DOS window is only valid for the application of the current window)
2, the role of PATH variable
The Java program is first looking for Java.exe at the path defined in the PATH variable, and is the first found, if installed
The J2SDK will not be set up, usually the C: / Windows / System32 directory.
J2SDK1.4 (also other Java development tools such as JBuilder8) will copy java.exe to C: / Windows / System32 after installation
In the directory, when executing Java.exe, some files under this SDK are required.
Such as J2SDK1.4. After the installation is complete, Java.exe under C: / Windows / System 32 will run at C: / Program File / Java /
Some files required in the directory are loaded. However, C: /J2SDK1.4/bin will be set at the top of the PATH variable after installing J2SDK.
When J2SDK1.4 is installed, when the JBuilder8 and other development tools are installed, when JBuilder8's java.exe is copied to C: / Windows / System32
It may cover Java.exe of J2SDK1.4, then the time running Java.exe will go to the Directory of JBuilder8 to load the required files.
3. How to view which SDK used when there is multiple SDK versions in the machine
Java -verbose
You can see the files under the display of the system in the screen information that appears.
4. ClassPath environment variable tells the class loader to find the class and user-defined classes provided by third parties.
You can also use the JVM command line parameter-ClassPath to specify class paths for the application, respectively, and the class path specified in the -classpath overrides the value specified in the ClassPath environment variable.
5, set PATH under Windows 2000
[System] -> Environment] -> [Advanced], the top input C: /J2SDK1.4/bin in the text box of the PATH variable