Windows Java配置环境变量
首先从Oracle JDK网站下载需要的JDK
配置环境变量
路径:我的电脑->属性->高级系统设置->环境变量->系统变量
在"系统变量"中设置3项属性
- JAVA_HOME
- PATH
- CLASSPATH(大小写无所谓)
若已存在则点击"编辑",不存在则点击"新建"。
变量设置参数如下:
1.变量名:JAVA_HOME
变量值:C:Program Files (x86)Javajdk1.8.0_91 // 要根据自己的实际路径配置
2.变量名:CLASSPATH
变量值:.;%JAVA_HOME%libdt.jar;%JAVA_HOME%lib ools.jar; //记得前面有个"."
3.变量名:Path
变量值:%JAVA_HOME%in;%JAVA_HOME%jrein;