centos 查看jdk 安装路径
命令行:
which java
输出:
/usr/bin/java
再次输入:
ls -lr /usr/bin/java
输出:
lrwxrwxrwx 1 root root 22 4月 26 17:24 /usr/bin/java -> /etc/alternatives/java
输入:
ls -lrt /etc/alternatives/java
输出:
lrwxrwxrwx 1 root root 35 4月 26 17:24 /etc/alternatives/java -> /usr/java/jdk1.8.0_121/jre/bin/java
java的安装路径就是:
/usr/java/jdk1.8.0_121/jre/bin/java