1、查看jdk的安装路径
[root@localhost /]# which java
/usr/bin/java
[root@localhost /]# ls -lrt /usr/bin/java
lrwxrwxrwx. 1 root root 22 Jun 26 03:33 /usr/bin/java -> /etc/alternatives/java
[root@localhost /]# ls -lrt /etc/alternatives/java
lrwxrwxrwx. 1 root root 71 Jun 26 03:33 /etc/alternatives/java -> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64/jre/bin/java
[root@localhost /]# cd /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64
[root@localhost java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64]# ls
jre
[root@localhost java-1.8.0-openjdk-1.8.0.181-7.b13.el7.x86_64]#
上图红框即为jdk的安装路径。