Linux上更改机器JDK

1.Removetheoldemptyjavaenvironment(删除旧版本)

#rm-f/usr/bin/java

#rm-f/usr/bin/javac

#rm-f/etc/alternatives/java

#rm-f/etc/alternatives/javac

2.#cd/usr/bin

#ln-s-f/usr/jdk5/jre/bin/java

#ln-s-f/usr/jdk5/bin/javac

java-version就可看到更换后的JDK版本

相关推荐