LINUX 安装JDK 卸载
卸载jdk
1.先查找安装的jdk文件
[root@localhost soft]# rpm -qa | grep jdk
[root@localhost soft]# rpm -qa | grep gcj
2.用yum 进行卸载
yum -y remove java-1.4.2-gcj-compat-1.4.2.0-40jpp.115
安装jdk
1.执行bin文件 ./jdk_xx_xx.bin
2.配置环境变量
在/etc/profile后面添加
#set java environment
export JAVA_HOME=/usr/java/jdk1.7.0_25
export JAVA_BIN=/usr/java/jdk1.7.0_25/bin
export PATH=$PATH:$JAVA_HOME/bin
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
export JAVA_HOME JAVA_BIN PATH CLASSPATH
3.重新加载profile文件
source /etc/profile
相关推荐
lonesomer 2020-09-17
Locksk 2020-10-12
佛系程序员J 2020-10-10
gdb 2020-09-14
zousongshan 2020-08-10
hell0kitty 2020-07-28
malonely 2020-07-20
missingmuch 2020-07-19
eternityzzy 2020-07-19
wangrui0 2020-06-28
一世为白 2020-06-21
MAC2007 2020-06-16
凉白开 2020-06-17
zhangwentaohh 2020-06-14
liangston 2020-06-14
linzb 2020-06-14
89421478 2020-06-12