-
Notifications
You must be signed in to change notification settings - Fork 1
Linux下JDK安装
Kervin edited this page Sep 20, 2017
·
2 revisions
1.解压jdk
2.重名
cd /home
sudo mv jdk1.8.0_144 jdk1.8
3.环境变量配置
sudo vi /etc/profile
#Jdk setting
JAVA_HOME=/home/jdk1.8
JRE_HOME=/home/jdk1.8/jre
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
CLASSPATH=:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
export JAVA_HOME JRE_HOME PATH CLASSPATH
4.刷新软连接
source /etc/profile
sudo ln -s /home/jdk1.8/bin/java /sbin/java
java -version