Linux installation source jdk

Step 1:
You can use xhsell or ftp to transfer jdk to the server. Step 2: Unzip the file tar -xzvf jdk-7u80-linux-x64.tar.gz Step 3: Configure the environment variable and input it. Note: Modify JAVA_HOME and JRE_HOME are their own installation paths






cat>>/etc/profile<<EOF
export JAVA_HOME=/home/java/jdk1.7.0_80/
export JRE_HOME=/home/java/jdk1.7.0_80/jre/
export CLASSPATH=.:\$JAVA_HOME/lib/dt.jar:\$JAVA_HOME/lib/tools.jar:\$JRE_HOME/lib
export PATH=\$JAVA_HOME/bin:\$JRE_HOME/bin:\$PATH
EOF
source /etc/profile

Step 4: Test
Java -version
The following appears
: java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326219831&siteId=291194637