Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8252689

Classes are loaded from jrt:/java.base even when CDS is used

XMLWordPrintable

    • b16

      $ echo 'public class HelloWorld { public static void main(String args[]) { System.out.println("Hello World"); }}' > HelloWorld.java
      $ javac HelloWorld.java
      $ jar cvf HelloWorld.jar HelloWorld.class
      $ java -XX:DumpLoadedClassList=HelloWorld.classlist -cp HelloWorld.jar HelloWorld
      $ java -Xlog:cds -Xshare:dump -XX:SharedClassListFile=HelloWorld.classlist -cp HelloWorld.jar -XX:SharedArchiveFile=HelloWorld.jsa
      $ java -XX:SharedArchiveFile=HelloWorld.jsa -cp HelloWorld.jar -verbose HelloWorld | grep jrt:
      [0.036s][info][class,load] java.util.jar.Attributes source: jrt:/java.base
      [0.036s][info][class,load] java.util.LinkedHashMap source: jrt:/java.base
      [0.036s][info][class,load] java.util.jar.Manifest$FastInputStream source: jrt:/java.base

            minqi Yumin Qi
            iklam Ioi Lam
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: