《深入理解Java虚拟机》- Java虚拟机是如何加载Java类的?

Java虚拟机是如何加载Java类的?  这个问题也就是面试常问到的Java类加载机制。在年初面试百战之后,菜鸟喜鹊也是能把这流程倒背如流啊!但是,也只是字面上的背诵,根本就是像上学时背书考试一样。

tonight ! 我们把它映射到实战里,看看如何用代码说明这个流程。

ready! go!  ----------------在这之前还是搞点理论吧,不然又要先去百度加载机制流程了。

一、类加载机制(理论部分)

类加载机制有三大过程:加载、链接、初始化。其中链接又细分为验证、准备及解析。

Java语言的类型分为两大类:基本类型和引用类型。Java的基本类型是由Java虚拟机预先定义好的。而引用类型又分为:数组类、类、接口、泛型参数。在JVM中,只存在数组类、类、接口三类,而数组类是直接由Java虚拟机直接生成的,其他两类则有字节流而来。

字节流又是怎么来呢?最常见的还是从字节码文件而来(还可以从网络等而来)。所以,我就以字节码文件分析一下加载机制。

1.加载

加载是指查找字节流,并据此创建类的过程。对于数组类来说,它们是可以由Java虚拟机直接生成。而其他两类,却需要借助类加载器,Java虚拟机才能完成查找字节流的工作。

类加载器与类的关系就像是UI与效果图一样,需要将业务需求翻译成效果图。美丽的UI就是类加载器,效果图就是类。

类加载器有一个模型:双亲委派

双亲委派模型是每次收到类加载请求时,先将请求委派给父类加载器完成,如果父类加载器无法完成加载,那么子类尝试自己加载

类加载器分为三种,启动类加载器、扩展类加载器、应用类加载器

其中,

启动类加载器(Application ClassLoader)是负责加载最为基础、最为重要的类,即加载<JAVA_HOME>\lib目录下核心库

扩展类加载器的父类加载器是启动类加载器,扩展类加载器负责加载相对次要、但又通用的类,即加载<JAVA_HOME>\lib\ext目录下扩展包

应用类加载器的父类加载器是扩展类加载器,应用类加载器负责加载应用程序路径下的类,即用户路径(classpath)上指定的类库

这三者类加载器的关系可以这样描述:

每当类加载器接收到加载请求时,它会先将请求转发给父类加载器,在父类加载器中没有找到需要的类的情况下,该加载器才会尝试去加载。

比如,应用加载器接收到加载请求, 会先去找父类加载器(扩展类加载器)里有没有需要的类,但该扩展类加载器顶头还有父类加载器(启动类加载器), 所以还要去启动类加载器中查找是否存在需要的类,如果不存在,那扩展类加载器就会自己加载需要的类,然后把引用传递给应用加载器。

类加载器还有一个功能,就是提供命名空间的作用。

在Java虚拟机中,类的唯一性是由类加载器实例以及类的全名一同确定的。即便是同一串字节流,经过不同的类加载器加载,也会得到两个不同的类。(这里可以读者自己实现一下,用两个扩展类加载器加载同一个类,然后打印一下类信息就可以验证了)

2.链接

链接:将创建成的类合并至Java虚拟机中,使之能够执行的过程。(这里是下面代码要验证一个步骤)

链接分为验证、准备、解析。

验证的目的是为了让被加载的类能够满足Java虚拟机的约束。(关于约束条件,今天暂时不讲。)

准备的目的是为了被加载类的静态字段分配内存。(仅仅是分配内存,并没有在内存中写东西)除此之外,有些Java虚拟机还会用来实现虚方法的动态绑定的方法表。

下一步就是我们链接的重要步骤--解析

对于一个方法的调用,编译器会解析一个符号,这个符号能够无歧义地定位到具体的目标上。这个符号包含目标方法所在类的名字、目标方法的名字、接收的参数类型以及返回值类型的符号引用。

如果符号引用指向一个未被加载的类、字段、方法,那么这个解析将触发加载功能。

3.初始化

初始化:为标记为常量值的字段赋值,以及执行<clinit>方法的过程。

只有初始化完成之后,类才正式成为可执行的状态。

那初始化这个步骤是什么时候执行呢?

JVM规范枚举了下述多种触发初始化的情况:

《深入理解Java虚拟机》- Java虚拟机是如何加载Java类的?

理论部分讲解完了。(参考链接:https://time.geekbang.org/column/article/11523)

二、类加载机制(Linux查看字节码)

在这,主要是因为网上都是一大串的理论描述,看得也是半信半疑。还不如拿出代码来,让自己也心服口服了。

talk is cheap,show the code!

1.classloader

《深入理解Java虚拟机》- Java虚拟机是如何加载Java类的?

输出如下:

《深入理解Java虚拟机》- Java虚拟机是如何加载Java类的?

结果很惊人,为什么父类加载器的父类加载器(我自己取名为爷爷类加载器。。),照理论来说,应该打印的是bootstrapClassLoader。 其实是它隐身了。贴一下代码里的一段注释:

* Returns the parent class loader for delegation. Some implementations may
* use <tt>null</tt> to represent the bootstrap class loader. This method
* will return <tt>null</tt> in such implementations if this class loader's
* parent is the bootstrap class loader.

翻译黄色的句子就是:如果父类加载器是启动类加载器,则将返回null

但还是没解决怎么找bootstrapClassLoader啊。

它实际上不是 java.lang.ClassLoader的子类,而是由JVM自身实现的,我们可以通过这个方法得到实现的类路径。

URL[] urls=sun.misc.Launcher.getBootstrapClassPath().getURLs();

2.链接

3.初始化

1.编译的单例类:Singleton.java

public class Singleton{
private Singleton(){}
private static class LazyHolder{
static final Singleton INSTANCE = new Singleton();
static{
System.out.println("LazyHolder.<clinit>");
}
}
public static Object getInstance(boolean flag){
if(flag) return new LazyHolder[2];
return LazyHolder.INSTANCE;
}
public static void main(String... args){
System.out.println("---");
getInstance(true);
System.out.println("---");
getInstance(false);
}
}

2.编译并运行

[root@localhost tmp3]# javac Singleton.java
[root@localhost tmp3]# java Singleton
---
---
LazyHolder.<clinit>

3.查看字节码文件(用的新指令:java -verbose:class Singleton)

《深入理解Java虚拟机》- Java虚拟机是如何加载Java类的?

结合2,3的输出,我想,我该讲点啥。

在两段“-----”中,如果没有打印加载信息,我们就以为是连续输出了。但是并没有。根据加载信息来看,中间还会加载Singleton$LazyHolder这个内部类,而这一步,对应的就是getInstance(true);。说明了啥?说明了前面理论部分的链接的最后一句话:

如果符号引用指向一个未被加载的类、字段、方法,那么这个解析将触发加载功能。

这里注意的是,仅仅调用了加载功能而已,这里只完成了创建类而已,并没有让它继续进行链接和初始化功能。所以在这里,也就不会出现打印“LazyHolder.<clinit>”的字样。

当使用到了getInstance(true)的时候,由于需要使用到“LazyHolder.INSTANCE;”这个静态常量,而它又与new 构造器方法相连通,此时就满足了理论中初始化的解释:

2.当遇到用以新建目标类实例的new指令时,初始化new指令的目标类
3.当遇到访问静态字段的指令时,初始化该静态字段所在的类

在这,大家应该也有疑问:getInstance(false)的时候也有new啊。但是,false时候的new,只是new数组,数组里装的只是加载时候生成的类引用。

大家还可以看下面class字节码就知道,注释那里就标记着很清楚是类引用而已。

Singleton.class

  public static java.lang.Object getInstance(boolean);
descriptor: (Z)Ljava/lang/Object;
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
0: iload_0
1: ifeq 9
4: iconst_2
5: anewarray #3 // class Singleton$LazyHolder
8: areturn
9: getstatic #4 // Field Singleton$LazyHolder.INSTANCE:LSingleton;
12: areturn
LineNumberTable:
line 11: 0
line 12: 9
StackMapTable: number_of_entries = 1
frame_type = 9 /* same */ public static void main(java.lang.String...);
descriptor: ([Ljava/lang/String;)V
flags: ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=1, args_size=1
0: getstatic #5 // Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc #6 // String ---
5: invokevirtual #7 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
8: iconst_1
9: invokestatic #8 // Method getInstance:(Z)Ljava/lang/Object;
12: pop
13: getstatic #5 // Field java/lang/System.out:Ljava/io/PrintStream;
16: ldc #6 // String ---
18: invokevirtual #7 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
21: iconst_0
22: invokestatic #8 // Method getInstance:(Z)Ljava/lang/Object;
25: pop
26: return
LineNumberTable:
line 15: 0
line 16: 8
line 17: 13
line 18: 21
line 19: 26 Singleton(Singleton$1);
descriptor: (LSingleton$1;)V
flags: ACC_SYNTHETIC
Code:
stack=1, locals=2, args_size=2
0: aload_0
1: invokespecial #1 // Method "<init>":()V
4: return
LineNumberTable:
line 1: 0
}

可以看到,在getInstance中,那么#3 和#4 对应的是啥

《深入理解Java虚拟机》- Java虚拟机是如何加载Java类的?

现在,

看了例子之后,大家应该也对类加载机制有了一点点了解了吧。

附:java -verbose:class Singleton 显示的全部信息

 [root@localhost tmp3]# java -verbose:class Singleton
[Opened /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Object from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.Serializable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Comparable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.CharSequence from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.String from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.AnnotatedElement from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.GenericDeclaration from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Type from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Cloneable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.System from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Throwable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Error from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ThreadDeath from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Exception from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.RuntimeException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.SecurityManager from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.ProtectionDomain from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.AccessControlContext from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.SecureClassLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ReflectiveOperationException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassNotFoundException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.LinkageError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.NoClassDefFoundError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassCastException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ArrayStoreException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.VirtualMachineError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.OutOfMemoryError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.*Error from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.IllegalMonitorStateException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.SoftReference from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.WeakReference from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.FinalReference from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.PhantomReference from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Cleaner from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.Finalizer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Runnable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Thread from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Thread$UncaughtExceptionHandler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ThreadGroup from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Map from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Dictionary from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Hashtable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Properties from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.AccessibleObject from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Member from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Field from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Parameter from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Executable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Method from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Constructor from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.MagicAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.MethodAccessor from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.MethodAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.ConstructorAccessor from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.ConstructorAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.DelegatingClassLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.ConstantPool from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.FieldAccessor from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.FieldAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.UnsafeFieldAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.UnsafeStaticFieldAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.annotation.Annotation from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.CallerSensitive from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandle from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.DirectMethodHandle from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MemberName from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleNatives from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.LambdaForm from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodType from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.BootstrapMethodError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.CallSite from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.ConstantCallSite from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MutableCallSite from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.VolatileCallSite from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Appendable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.AbstractStringBuilder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.StringBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.StringBuilder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Unsafe from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.AutoCloseable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.Closeable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.InputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.ByteArrayInputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.File from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URLClassLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URL from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.jar.Manifest from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Launcher from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$AppClassLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$ExtClassLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.CodeSource from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.StackTraceElement from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.Buffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Boolean from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Character from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Number from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Float from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Double from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Byte from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Short from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Integer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Long from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.NullPointerException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ArithmeticException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.ObjectStreamField from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Comparator from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.String$CaseInsensitiveComparator from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.Guard from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.Permission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.BasicPermission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.RuntimePermission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.AccessController from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.ReflectPermission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.PrivilegedAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.ReflectionFactory$GetReflectionFactoryAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.cert.Certificate from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Iterable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.List from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.RandomAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.AbstractCollection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.AbstractList from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Vector from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Stack from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.ReflectionFactory from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference$Lock from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference$ReferenceHandler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.InterruptedException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.ArrayList from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Set from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.AbstractSet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$EmptySet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$EmptyList from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.AbstractMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$EmptyMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$UnmodifiableCollection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$UnmodifiableList from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$UnmodifiableRandomAccessList from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.ReferenceQueue from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.ReferenceQueue$Null from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.ReferenceQueue$Lock from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaLangRefAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.Reference$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.SharedSecrets from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.IncompatibleClassChangeError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.NoSuchMethodError from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.Reflection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.HashMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Map$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.HashMap$Node from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.VM from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Hashtable$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Math from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ref.Finalizer$FinalizerThread from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.Charset from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.spi.CharsetProvider from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.FastCharsetProvider from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.StandardCharsets from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.PreHashedMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.StandardCharsets$Aliases from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.StandardCharsets$Classes from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.StandardCharsets$Cache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ThreadLocal from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.atomic.AtomicInteger from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class$3 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class$ReflectionData from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class$Atomic from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.generics.repository.AbstractRepository from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.generics.repository.GenericDeclRepository from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.generics.repository.ClassRepository from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class$AnnotationData from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.annotation.AnnotationType from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.WeakHashMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassValue$ClassValueMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Modifier from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.LangReflectAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.ReflectAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Arrays from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.HistoricallyNamedCharset from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.Unicode from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.UTF_8 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.ReflectionFactory$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.NativeConstructorAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.DelegatingConstructorAccessorImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.StringCoding from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ThreadLocal$ThreadLocalMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ThreadLocal$ThreadLocalMap$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.StringCoding$StringDecoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.ArrayDecoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CharsetDecoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.UTF_8$Decoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CodingErrorAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Hashtable$EntrySet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$SynchronizedCollection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$SynchronizedSet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Objects from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Enumeration from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Iterator from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Hashtable$Enumerator from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Runtime from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Version from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileInputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileDescriptor from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaIOFileDescriptorAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileDescriptor$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.Flushable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.OutputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileOutputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FilterInputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.BufferedInputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.PrivilegedExceptionAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.reflect.misc.ReflectUtil from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FilterOutputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.PrintStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.BufferedOutputStream from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.Writer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.OutputStreamWriter from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.StreamEncoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.security.action.GetPropertyAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.ArrayEncoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CharsetEncoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.UTF_8$Encoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.ByteBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.HeapByteBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.Bits from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.ByteOrder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.atomic.AtomicLong from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaNioAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.Bits$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.BufferedWriter from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.DefaultFileSystem from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileSystem from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.UnixFileSystem from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.ExpiringCache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.LinkedHashMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.ExpiringCache$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Enum from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.File$PathStatus from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.file.Watchable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.file.Path from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.StringCoding$StringEncoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader$3 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.ExpiringCache$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.LinkedHashMap$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader$NativeLibrary from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Terminator from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.SignalHandler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Terminator$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Signal from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.NativeSignalHandler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Integer$IntegerCache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.OSEnvironment from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaLangAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.System$2 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.IllegalArgumentException from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Compiler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Compiler$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URLStreamHandlerFactory from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$Factory from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.security.util.Debug from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassLoader$ParallelLoaders from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.WeakHashMap$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Collections$SetFromMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.WeakHashMap$KeySet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaNetAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URLClassLoader$7 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.StringTokenizer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$ExtClassLoader$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.MetaIndex from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Readable from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.Reader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.BufferedReader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.InputStreamReader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileReader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.cs.StreamDecoder from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.CharBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.HeapCharBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CoderResult from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CoderResult$Cache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CoderResult$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.charset.CoderResult$2 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.reflect.Array from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.HashMap$TreeNode from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileInputStream$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.www.ParseUtil from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.BitSet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Locale from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.locale.LocaleObjectCache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Locale$Cache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.locks.Lock from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.locks.ReentrantLock from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$Segment from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$Node from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$CounterCell from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$CollectionView from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$KeySetView from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$ValuesView from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.ConcurrentHashMap$EntrySetView from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.locale.BaseLocale from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.locale.BaseLocale$Cache from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.locale.BaseLocale$Key from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.locale.LocaleObjectCache$CacheEntry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.Locale$LocaleKey from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.util.locale.LocaleUtils from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.CharacterData from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.CharacterDataLatin1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.Parts from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URLStreamHandler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.www.protocol.file.Handler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaSecurityAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.ProtectionDomain$JavaSecurityAccessImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaSecurityProtectionDomainAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.ProtectionDomain$2 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.ProtectionDomain$Key from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.Principal from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.HashSet from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.www.protocol.jar.Handler from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Launcher$AppClassLoader$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.SystemClassLoaderAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.function.Function from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$2 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$3 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassValue from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleImpl$4 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassValue$Entry from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassValue$Identity from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.ClassValue$Version from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MemberName$Factory from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleStatics from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.invoke.MethodHandleStatics$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.PostVMInitHook from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.usagetracker.UsageTrackerClient from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.concurrent.atomic.AtomicBoolean from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.usagetracker.UsageTrackerClient$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.usagetracker.UsageTrackerClient$4 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.usagetracker.UsageTrackerClient$3 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FileOutputStream$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.launcher.LauncherHelper from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URLClassLoader$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.util.URLUtil from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$3 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$Loader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$JarLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.zip.ZipConstants from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.zip.ZipFile from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.JavaUtilZipFileAccess from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.util.zip.ZipFile$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$FileLoader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Resource from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.URLClassPath$FileLoader$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.ByteBuffered from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.PerfCounter from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Perf$GetPerfAction from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.Perf from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.misc.PerfCounter$CoreCounters from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.nio.ch.DirectBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.MappedByteBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.DirectByteBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.LongBuffer from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.nio.DirectLongBufferU from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.PermissionCollection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.Permissions from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.net.URLConnection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.www.URLConnection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.www.protocol.file.FileURLConnection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded sun.net.www.MessageHeader from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FilePermission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FilePermission$1 from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.io.FilePermissionCollection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.AllPermission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.UnresolvedPermission from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.security.BasicPermissionCollection from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded Singleton from file:/usr/local/asmtools-7.0-build/binaries/lib/tmp3/]
[Loaded sun.launcher.LauncherHelper$FXHelper from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Class$MethodArray from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Void from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
---
[Loaded Singleton$LazyHolder from file:/usr/local/asmtools-7.0-build/binaries/lib/tmp3/]
---
LazyHolder.<clinit>
[Loaded java.lang.Shutdown from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]
[Loaded java.lang.Shutdown$Lock from /usr/local/jdk1.8.0_111/jre/lib/rt.jar]

javap -verbose Singleton显示的全部信息

 [root@localhost tmp3]# javap -verbose Singleton
Classfile /usr/local/asmtools-7.0-build/binaries/lib/tmp3/Singleton.class
Last modified Aug 13, 2019; size 770 bytes
MD5 checksum 993ff066c953984c811ff7998d1a8e10
Compiled from "Singleton.java"
public class Singleton
minor version: 0
major version: 52
flags: ACC_PUBLIC, ACC_SUPER
Constant pool:
#1 = Methodref #9.#26 // Singleton."<init>":()V
#2 = Methodref #10.#26 // java/lang/Object."<init>":()V
#3 = Class #27 // Singleton$LazyHolder
#4 = Fieldref #3.#28 // Singleton$LazyHolder.INSTANCE:LSingleton;
#5 = Fieldref #29.#30 // java/lang/System.out:Ljava/io/PrintStream;
#6 = String #31 // ---
#7 = Methodref #32.#33 // java/io/PrintStream.println:(Ljava/lang/String;)V
#8 = Methodref #9.#34 // Singleton.getInstance:(Z)Ljava/lang/Object;
#9 = Class #35 // Singleton
#10 = Class #36 // java/lang/Object
#11 = Class #37 // Singleton$1
#12 = Utf8 InnerClasses
#13 = Utf8 LazyHolder
#14 = Utf8 <init>
#15 = Utf8 ()V
#16 = Utf8 Code
#17 = Utf8 LineNumberTable
#18 = Utf8 getInstance
#19 = Utf8 (Z)Ljava/lang/Object;
#20 = Utf8 StackMapTable
#21 = Utf8 main
#22 = Utf8 ([Ljava/lang/String;)V
#23 = Utf8 (LSingleton$1;)V
#24 = Utf8 SourceFile
#25 = Utf8 Singleton.java
#26 = NameAndType #14:#15 // "<init>":()V
#27 = Utf8 Singleton$LazyHolder
#28 = NameAndType #38:#39 // INSTANCE:LSingleton;
#29 = Class #40 // java/lang/System
#30 = NameAndType #41:#42 // out:Ljava/io/PrintStream;
#31 = Utf8 ---
#32 = Class #43 // java/io/PrintStream
#33 = NameAndType #44:#45 // println:(Ljava/lang/String;)V
#34 = NameAndType #18:#19 // getInstance:(Z)Ljava/lang/Object;
#35 = Utf8 Singleton
#36 = Utf8 java/lang/Object
#37 = Utf8 Singleton$1
#38 = Utf8 INSTANCE
#39 = Utf8 LSingleton;
#40 = Utf8 java/lang/System
#41 = Utf8 out
#42 = Utf8 Ljava/io/PrintStream;
#43 = Utf8 java/io/PrintStream
#44 = Utf8 println
#45 = Utf8 (Ljava/lang/String;)V
{
public static java.lang.Object getInstance(boolean);
descriptor: (Z)Ljava/lang/Object;
flags: ACC_PUBLIC, ACC_STATIC
Code:
stack=1, locals=1, args_size=1
0: iload_0
1: ifeq 9
4: iconst_2
5: anewarray #3 // class Singleton$LazyHolder
8: areturn
9: getstatic #4 // Field Singleton$LazyHolder.INSTANCE:LSingleton;
12: areturn
LineNumberTable:
line 11: 0
line 12: 9
StackMapTable: number_of_entries = 1
frame_type = 9 /* same */ public static void main(java.lang.String...);
descriptor: ([Ljava/lang/String;)V
flags: ACC_PUBLIC, ACC_STATIC, ACC_VARARGS
Code:
stack=2, locals=1, args_size=1
0: getstatic #5 // Field java/lang/System.out:Ljava/io/PrintStream;
3: ldc #6 // String ---
5: invokevirtual #7 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
8: iconst_1
9: invokestatic #8 // Method getInstance:(Z)Ljava/lang/Object;
12: pop
13: getstatic #5 // Field java/lang/System.out:Ljava/io/PrintStream;
16: ldc #6 // String ---
18: invokevirtual #7 // Method java/io/PrintStream.println:(Ljava/lang/String;)V
21: iconst_0
22: invokestatic #8 // Method getInstance:(Z)Ljava/lang/Object;
25: pop
26: return
LineNumberTable:
line 15: 0
line 16: 8
line 17: 13
line 18: 21
line 19: 26 Singleton(Singleton$1);
descriptor: (LSingleton$1;)V
flags: ACC_SYNTHETIC
Code:
stack=1, locals=2, args_size=2
0: aload_0
1: invokespecial #1 // Method "<init>":()V
4: return
LineNumberTable:
line 1: 0
}
SourceFile: "Singleton.java"
InnerClasses:
static #11; //class Singleton$1
上一篇:linux内核裁剪及编译可加载模块


下一篇:FPGA笔记-读取.dat文件