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

 

posted @ 2023-04-27 13:50  我辈年轻  阅读(416)  评论(0编辑  收藏  举报