Here are the details:
1.JAVA_HOME
JAVA_HOME points to the path where the JDK is installed
You should be able to find directories such as bin, lib, and so on, under that path
For example, my setup would have been JAVA_HOME=C:\j2sdk1.4.2_09;
2. PATH
The purpose of setting PATH is to point to the JDK's bin directory
In the bin directory are the various compilation and execution commands
For example, my setup would be PATH=C:\j2sdk1.4.2_09\bin;
My setup would be PATH=C:\j2sdk1.4.2_09\bin;
If I were to set it to PATH=C:\j2sdk1.4.2_09\bin;
It should be noted that the system itself has a PATH environment variable, as long as the C:\j2sdk1.4.2_09\bin;C:\j2sdk1.4.2_09\jre\bin; directly behind the can be used to put the middle of the use of ";" separation
3.
3. CLASSPATH
CLASSPATH set the path of the class, but also the most important
such as my settings should be CLASSPATH=. ;C:\j2sdk1.4.2_09\lib;C:\j2sdk1.4.2_09\lib\tools.jar;
Placing the "." and ";" at the top, meaning look in the current directory first
The above configurations are all done under the premise that my JDK installation directory is C:\j2sdk1.4.2_09
You can modify it accordingly based on the actual installation directory
Configuration method:
Right-click on "My Computer" - -> -> lib\tools.jar;"
This is the first time that the JDK is installed in the current directory.
Click the "Environment Variables" button to bring up the "Environment Variables" panel, and configure the user variables or system variables accordingly
Note: The user variables are only valid for the user who is currently logged in to the machine, while the system variables are valid for all users who are logged in to the machine. You can configure them according to your own preferences in the corresponding variable environment
After all the environment variables have been configured, execute the java or javac commands directly in the command window, and the corresponding message will appear, indicating that the configuration has been successful
This is the first time that a java or javac command has been configured.