每次配置Java环境时都要去网上搜一下,这里干脆记录一下,以备不时之需:
正常安装java安装程序,记录一下安装路径,我这里安装在
c:Program FilesJavajdk1.8.0_11
添加环境变量:
JAVA_HOME C:Program FilesJavajdk1.8.0_11
Path %JAVA_HOME%in;%JAVA_HOME%jrein;
CLASSPATH .;%JAVA_HOME%libdt.jar;%JAVA_HOME%lib ools.jar;
在cmd下输入java 和 javac命令,有字符输出则表示配置成功。