环境变量设置

JDK

1.JAVA_HOME:

1
C:\Program Files\Java\jdk1.8.0_60

2.Path:

1
%JAVA_HOME%\bin;%JAVA_HOME%\jre\bin

3.CLASSPATH :

1
.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar

检测:

1
2
3
4
5
6
7
C:\Users\Administrator>echo %java_home%
C:\Program Files\Java\jdk1.8.0_60

C:\Users\Administrator>java -version
java version "1.8.0_60"
Java(TM) SE Runtime Environment (build 1.8.0_60-b27)
Java HotSpot(TM) 64-Bit Server VM (build 25.60-b23, mixed mode)

MAVEN

1.M2_HOME:

1
D:\Program Files\apache-maven-3.1.1

2.Path:

1
%M2_HOME%\bin

测试:

1
2
3
4
5
6
7
8
9
10
C:\Users\Administrator>echo %m2_home%
D:\Program Files\apache-maven-3.1.1

C:\Users\Administrator>mvn -v
Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a)
Maven home: D:\Program Files\apache-maven-3.1.1
Java version: 1.8.0_60, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jdk1.8.0_60\jre
Default locale: zh_CN, platform encoding: GBK
OS name: "windows 10", version: "10.0", arch: "amd64", family: "dos"

请作者喝瓶肥宅水🥤

0