Change machine JDK on Linux

1. Remove the old empty java environment
# 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 You can see the replacement JDK version

Guess you like

Origin http://10.200.1.11:23101/article/api/json?id=327033634&siteId=291194637