linux 查看java的安装路径 - 悄悄的来,匆匆的走

时间:2024-02-23 22:24:38

linux 查看java的安装路径

1.

[root@tshare365 bin]# whereis java
java: /usr/bin/java /usr/lib/java /etc/java /usr/share/java /usr/share/man/man1/java.1.gz

 

2.

[root@tshare365 bin]# ls -lrt /usr/bin/java
lrwxrwxrwx. 1 root root 22 Jan 22 2018 /usr/bin/java -> /etc/alternatives/java

 

3.

[root@tshare365 bin]# ls -lrt /etc/alternatives/java
lrwxrwxrwx. 1 root root 72 Jan 22 2018 /etc/alternatives/java -> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java

 

/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.51-2.4.5.5.el7.x86_64/jre/bin/java 就是java的安装路径