-
按默认设置一直点下一步
- 记录安装路径
- 本机路径:C:Program FilesJava
- 该目录下包含2个路径 后面需要用
- C:Program FilesJavajdk1.8.0_291
- C:Program FilesJavajre1.8.0_291
-
配置环境变量
-
在系统变量新建
-
变量 :JAVA_HOME 值: C:Program FilesJava
-
在Path变量增加值:%JAVA_HOME%jdk1.8.0_291in
-
在path变量增加值:%JAVA_HOME%jre1.8.0_291in
-
-
%JAVA_HOME%表示JAVA_HOME变量所表示的路径,是C:Program FilesJava的引用
-
在控制台输入java -version 应为下图显示值