2

Java 8 安装和环境配置

 2 years ago
source link: https://segmentfault.com/a/1190000040854086
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

Java 8 开发环境配置

一、下载 JDK

下载地址:https://www.oracle.com/java/technologies/downloads/#java8-windows

点击对应的版本下载,然后安装。我的安装目录是:C:\Program Files\Java

二、配置环境变量

打开电脑的环境变量

1、新建两个环境变量

  • 变量名:JAVA_HOME
    变量值:C:\Program Files\Java\jdk1.8.0_311 // 填写jdk安装目录
  • 变量名:CLASSPATH
    变量值:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;

2、在环境变量Path中添加变量
添加两条变量值:%JAVA_HOME%\bin%JAVA_HOME%\jre\bin

三、检测是否安装成功

打开cmd,并输入指令: java -version,显示出版本即为安装成功


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK