首页 关于 归档

linux安装sun java

sun java install

#下载略
➜ mkdir /usr/lib/jvm
➜ tar -zxvf jdk-8u111-linux-x64.tar.gz -C /usr/lib/jvm

➜ export JAVA_HOME=/usr/lib/jvm/jdk1.8.0_111 
➜ export JRE_HOME=${JAVA_HOME}/jre  
➜ export CLASSPATH=.:${JAVA_HOME}/lib:${JRE_HOME}/lib  
➜ export PATH=${JAVA_HOME}/bin:$PATH  

➜ update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.8.0_111/bin/java 300  
➜ update-alternatives --install /usr/bin/javac javac /usr/lib/jvm/jdk1.8.0_111/bin/javac 300  
➜ update-alternatives --install /usr/bin/jar jar /usr/lib/jvm/jdk1.8.0_111/bin/jar 300   
➜ update-alternatives --install /usr/bin/javah javah /usr/lib/jvm/jdk1.8.0_111/bin/javah 300   
➜ update-alternatives --install /usr/bin/javap javap /usr/lib/jvm/jdk1.8.0_111/bin/javap 300 

➜ update-alternatives --config java
#选择sun java为默认

Author: josephzeng

Date: <2016-12-12 Mon>

Generated by Emacs 24.5.1 (Org mode 8.2.10)

Last Updated <2016-12-12 Mon>

Validate