First of all, you should have installed the Java JDK, the author installed is: jdk-7u13-windows-x64
Next the main talk about how to configure the environment variables of Java, but also for the next day I forgot to make a backup
1. Go to the "Properties" option of "Computer" and select "Advanced system Settings" as shown in:
2. When you click on "Advanced system Settings", you will see the dialog box as shown, select "Environment variables":
3. After clicking on "Environment variable", you will see the dialog box as shown:
4, the next step is the specific configuration process:
①、选择所示的“新建”,
“变量名”:Java_Home“变量值”:D:\Program Files (x86)\Java\jdk1.7.0_67注:“变量值”这一栏主要填写的是你安装 java 的路径,这里根据个人的情况可能会有所不同②、上步结束之后,选中环境变量中的“path”,如所示:
选中之后编辑:在“变量值”一栏的最前面添加如下的 code:%Java_Home%\bin;%Java_Home%\jre\bin;注意:上面的代码最好一个字符不要差,因为 Java_Home 已经限制了你的 JDK 的路径了,Java 的每个版本的 JDK 应该都是由这些东西构成的③、上一步确定之后,再“新建”:
“变量名”:ClassPath“变量值”:.;%Java_Home%\bin;%Java_Home%\lib\dt.jar;%Java_Home%\lib\tools.jar注:上面的代码最好也是一个字符不变的贴上去,“变量值”最前面的 .; 不要漏掉。
After completing the three steps above, the configuration of the environment variable has been completed.
5, check whether the environment variables are set up: "CMD" check
1、输入:“java”,你应该看到下面的东西:2、输入“javac”,你应该看到下面的东西:
3、输入“java -version”,你应该看到下面的东西:
If you see the three pictures above, congratulations, the Java environment variable is configured!
Java Environment installation (Win7)