1. 程式人生 > >設定mvn環境變數

設定mvn環境變數

export JAVA_HOME=/usr/local/jdk1.8.0_171


export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar


export M3_HOME=/usr/local/apache-maven-3.5.4


export PATH=$JAVA_HOME/bin:$M3_HOME/bin:$PATH




[[email protected] ~]#source /etc/profile


[[email protected] ~]#mvn -v
Apache Maven 3.5.4
(1edded0938998edf8bf061f1ceb3cfdeccf443fe; 2018-06-18T02:33:14+08:00) Maven home: /usr/local/apache-maven-3.5.4 Java version: 1.8.0_171, vendor: Oracle Corporation, runtime: /usr/local/jdk1.8.0_171/jre Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "3.10.0-862.el7.x86_64", arch: "amd64", family: "
unix"