java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java
之后/usr/share/java主要是你的第三方类库的位置
在/etc/java 下由一个java.conf的文件在这个文件中记录的jdk的位置
引用:# System-wide Java configuration file -*- sh -*-
#
# JPackage Project <http://www.jpackage.org/>
# Location of jar files on the system
JAVA_LIBDIR=/usr/share/java
# Location of arch-specific jar files on the system
JNI_LIBDIR=/usr/lib/java
# Root of all JVM installations
JVM_ROOT=/usr/lib/jvm
# You can define a system-wide JVM root here if you're not using the default one
#JAVA_HOME=$JVM_ROOT/java
# Options to pass to the java interpreter
JAVACMD_OPTS=
看到了吧,一目了然:java原来装在了/usr/lib/jvm/java这个目录下。