centos下查看Java安装路径

[hadoop@192 /]$ which java
/bin/java
[hadoop@192 /]$ ls -lrt /bin/java
lrwxrwxrwx. 1 root root 22 4月  17 06:25 /bin/java -> /etc/alternatives/java
[hadoop@192 /]$ ls -lrt /etc/alternatives/java
lrwxrwxrwx. 1 root root 72 4月  17 06:25 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.131-11.b12.el7.x86_64/jre/bin/java
[hadoop@192 /]$ 


rpm -ql java-1.7.0-openjdk-devel | grep '/bin/javac'

你可能感兴趣的:(centos)