1.查询java的jdk目录:
(1)判断是否安装了java 及大致路径 使用指令:whereis java
输出:java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
(2) 查询java的版本 使用指令 java -version
输出:
java version "1.7.0_75"
OpenJDK Runtime Environment (rhel-2.5.4.0.el6_6-i386 u75-b13)
OpenJDK Server VM (build 24.75-b04, mixed mode)
(3)判断jdk的路径 find /usr -name *1.7.0.75*
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75/tapset/hotspot_gc-1.7.0.75-2.5.4.0.el6_6.stp
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75/tapset/hotspot-1.7.0.75-2.5.4.0.el6_6.stp
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75/tapset/hotspot_jni-1.7.0.75-2.5.4.0.el6_6.stp
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.75/tapset/jstack-1.7.0.75-2.5.4.0.el6_6.stp
/usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.75
/usr/li