新安装了jdk,但重新连接之后仍然显示老的jdk
1. which java
2. which javac
3. rm -rf /usr/bin/java
4. rm -rf /usr/bin/javac
5. ln -s $JAVA_HOME/bin/java /usr/bin/java
6. ln -s $JAVA_HOME/bin/javac /usr/bin/javac
7. source /etc/profile
原文地址:https://www.cnblogs.com/syuf/p/9078235.html
时间: 2024-11-11 02:01:14