命令行:
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
标签:bin,java,jdk,centos,路径,alternatives,etc,usr,root From: https://www.cnblogs.com/wobeinianqing/p/17358708.html