which java ls -lrt /bin/java ls -lrt /etc/alternatives/java # 如果已经配好,则echo $JAVA_HOME
vim etc/profile # 立即生效 source /etc/profile