JAva environment variable Configuration:
(Either of the two methods is acceptable)
Method 1:
Click "my computer"-(right-click) "properties"-"advanced"-"environment variables" to bring up the "environment variables" configuration card for Windows.
In the system variables column, perform the following three operations:
① Create a new "classpath" (if it already exists, edit it directly) and set its value to.; JDK's absolute path value \ Lib
(For example,.; D: \ Program Files \ Java \ jdk1.5.0 _ 04) (if the value contains the original content, separate it with a semicolon ),
Note that the symbol before the path is.; cannot be missed
② Create a new "path" (edit it if it already exists) and set the value to % java_home % \ bin. (If the value contains content, separate it with a semicolon ).
Method 2:
Click "my computer"-(right-click) "properties"-"advanced"-"environment variables" to bring up the "environment variables" configuration card for Windows.
In the system variables column, perform the following three operations:
① Create java_home and set its value to the absolute path of JDK (for example, D: \ Program Files \ Java \ jdk1.5.0 _ 04 ).
② Create a new "classpath" (if it already exists, edit it directly) and set its value to.; % java_home % \ Lib (if the value contains content, separate it with a semicolon ).
Note that the symbol before the path is.; cannot be missed
③ Create a new "path" (if it already exists, edit it directly) with the value % java_home % \ bin. (If the value contains content, separate it with a semicolon ).
Test: Enter javac in the command line window