1.设置JAVA_HOME,指向JDK目录:
C:\Program Files\java\jdk8u282-b01
2.新建系统变量CLASS_PATH,变量设置为:
%Java_Home%\bin;%Java_Home%\lib\dt.jar;%Java_Home%\lib\tools.jar;
3.编辑系统变量Path,添加下面两条变量:
%JAVA_HOME%\bin
%JAVA_HOME%\jre\bin
4. 查看版本java -version
Microsoft Windows [版本 10.0.17763.1935]
(c) 2018 Microsoft Corporation。保留所有权利。
C:\Users\Administrator>java -version
openjdk version "1.8.0_282"
OpenJDK Runtime Environment (Alibaba Dragonwell 8.6.6) (build 1.8.0_282-b01)
OpenJDK 64-Bit Server VM (Alibaba Dragonwell 8.6.6) (build 25.282-b01, mixed mode)
C:\Users\Administrator>
注:
1.JAVA_HOME为源码文件存放路径
2.Alibaba_Dragonwell_8.6.6(阿里JDK)下载地址:
https://github.com/alibaba/dragonwell8/releases/download/dragonwell-8.6.6_jdk8u282-ga/Alibaba_Dragonwell_8.6.6_x64_windows.zip
分类:Windows
标签:
评论已关闭!