Linux如何查看JDK的安装路径

[root@bogon ~]# echo $java_home

[root@bogon ~]# which java
/bin/java
[root@bogon ~]# cd /bin
[root@bogon bin]# ls -lrf /bin/java
/bin/java
[root@bogon bin]# ls -lrt /bin/java
lrwxrwxrwx. 1 root root 22 4月 12 2017 /bin/java -> /etc/alternatives/java
[root@bogon bin]# ls -lrt /etc/alternatives/java
lrwxrwxrwx. 1 root root 71 4月 12 2017 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64/jre/bin/java
[root@bogon bin]# cd /usr/lib/jvm
[root@bogon jvm]# ls
java-1.7.0-openjdk-1.7.0.111-2.6.7.8.el7.x86_64
java-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64
jre
jre-1.7.0
jre-1.7.0-openjdk
jre-1.7.0-openjdk-1.7.0.111-2.6.7.8.el7.x86_64
jre-1.8.0
jre-1.8.0-openjdk
jre-1.8.0-openjdk-1.8.0.102-4.b14.el7.x86_64
jre-openjdk
[root@bogon jvm]#

posted @ 2018-03-24 16:09  坤霸天下  阅读(187)  评论(0编辑  收藏  举报