hands-on teaching you how to configure Java environment variables under win7 (windows7)
I am a very lazy person, after learning 3 weeks Java, has been using myeclipse programming. I was free this afternoon and I tried to program in a DOS environment. The premise is that Java needs to manually configure the environment variables, I would like to introduce my own configuration of the method, I hope to help you
background:
The JDK is installed on the Windows7 system, but the environment variables are not configured
Method/Step 1:
Right-click Computer (that is, My Computer)---------> properties
Select the Advanced system Settings option on the left navigation.
Select the Environment variables option in the lower-right corner
Step 2:
To win7 the Java environment variable configuration
Under System variables, configure the following:
(1) New-> variable name: Java_home variable Value C:\Program files\java\jdk1.6.0_10 (this is just my JDK installation path)
(2) Edit-> variable name: path at the front of the variable value plus%java_home%\bin;%java_home%\jre\bin
(3) New-> variable name: classpath variable value.; %java_home%\lib;%java_home%\lib\dt.jar;%java_home%\lib\tools.jar
Attention:
① recommends that the reader (2), (3) Copy the red part directly, without modification. (1) to become their own path can be
② different user variables and system variables are: If you create new and modified variables under User variables, you can only use the current user, if you switch users can not use, in the system variable, then all users are available under the current system, so it is recommended to install the reader in the system variable.
③ when you set the variable at the end, do not add ";".
Step 3:
Test whether the environment variable is set successfully
Type cmd in the search box in the lower-left corner
Or press the "Win+r" key, "WIN" is the "Ctrl" and "ALT" "the middle of that Microsoft icon that key;"
Enter the java,javac,java-version command separately
Step 4:
Your Java environment variable configuration was successful.
Attention Matters if ' Javac ' appears to be not an internal or external command, it is not a running program or a batch file. Description of the Java environment variable configuration error, check it carefully. If there is anything wrong with the place or the reader has any questions, welcome to leave a message, we exchange to improve.