I'm trying to debug class loading issue in a java clied that is being run via JNLP. But -XX:+TraceClassLoading
only prints 'Loaded' events and only for core classes. The other option, -verbose:class
does nothing. I tried to prefix it with D and X without effect.
When I use -verbose:class
in a desktop java application, it prints all events just fine, but the bug does not occur here.
Am I missing something or is there another way to trace class loading in JNLP?
Edit:
Examples of what I tried (this is what javaws
call expands into):
/usr/lib/jvm/jdk1.8.0_161/jre/bin/java -classpath /usr/lib/jvm/jdk1.8.0_161/jre/lib/deploy.jar -Djava.security.policy=file:/usr/lib/jvm/jdk1.8.0_161/jre/lib/security/javaws.policy -DtrustProxy=true -verbose:class -XX:+TraceClassLoading -Xverify:remote -Djnlpx.home=/usr/lib/jvm/jdk1.8.0_161/jre/bin -Djava.security.manager -Djnlpx.origFilenameArg=http://localhost:8080/webstart.jnlp -Djnlpx.remove=false -Dsun.awt.warmup=true -Xbootclasspath/a:/usr/lib/jvm/jdk1.8.0_161/jre/lib/javaws.jar:/usr/lib/jvm/jdk1.8.0_161/jre/lib/deploy.jar:/usr/lib/jvm/jdk1.8.0_161/jre/lib/plugin.jar -Djnlpx.splashport=59367 -Djnlpx.jvm=/usr/lib/jvm/jdk1.8.0_161/jre/bin/java com.sun.javaws.Main -notWebJava http://localhost:8080/webstart.jnlp
Partial output from JNLP run (no user classes):
[Loaded java.lang.UNIXProcess$$Lambda$15/1173574345 from java.lang.UNIXProcess]
[Loaded com.sun.javaws.Launcher$CacheUpdateRequiredException from /usr/lib/jvm/jdk1.8.0_161/jre/lib/javaws.jar]
[Loaded java.lang.SecurityException from /usr/lib/jvm/jdk1.8.0_161/jre/lib/rt.jar]
[Loaded com.sun.deploy.security.BlockedException from /usr/lib/jvm/jdk1.8.0_161/jre/lib/deploy.jar]
[Loaded sun.awt.X11.XSystemTrayPeer from /usr/lib/jvm/jdk1.8.0_161/jre/lib/rt.jar]
Partial output from desktop java run (notice user classes from .m2 repo and yes, it was run on _151 but there is no difference, I tried both):
[Loaded <...>.UnmodifiableArrayIterator from file:/home/imaskar/.m2/repository/<...>/1.6-SNAPSHOT/<...>-1.6-SNAPSHOT-jar-with-dependencies.jar]
[Loaded <...>.RCEvent from file:/home/imaskar/.m2/repository/<...>/1.6-SNAPSHOT/<...>-1.6-SNAPSHOT-jar-with-dependencies.jar]
[Loaded <...>.RCMessengerQualityListener$1 from file:/home/imaskar/.m2/repository/<...>/1.6-SNAPSHOT/<...>-1.6-SNAPSHOT.jar]
[Loaded javax.swing.JComponent$$Lambda$124/1794174740 from javax.swing.JComponent]
[Loaded java.util.prefs.FileSystemPreferences$10 from /usr/lib/jvm/jdk1.8.0_151/jre/lib/rt.jar]
[Loaded java.util.prefs.FileSystemPreferences$12 from /usr/lib/jvm/jdk1.8.0_151/jre/lib/rt.jar]
[Loaded java.util.prefs.FileSystemPreferences$11 from /usr/lib/jvm/jdk1.8.0_151/jre/lib/rt.jar]
Edit2:
Here is suggested another method of passing options to jnlp, but it also prints only core classes. I suppose, it happens because options only passed to the first java call, which only manages deployment and then makes another call to the actual application.