When executing in module mode, the java command doesn't show the verifyError message details

Alan Bateman Alan.Bateman at oracle.com
Sat Mar 23 15:09:07 UTC 2019


On 23/03/2019 13:17, forax at univ-mlv.fr wrote:
> :
>
> /usr/jdk/jdk-13/bin/java -Xlog:init=debug --enable-preview --module-path target/main/artifact:deps -m fr.umlv.lazystaticfinal
> Error: Unable to initialize main class fr.umlv.lazystaticfinal.Main in module module fr.umlv.lazystaticfinal
> Caused by: module fr.umlv.lazystaticfinal: java.lang.VerifyError
>
You first mail had:

Error occurred during initialization of boot layer
java.lang.module.FindException: Module org.objectweb.asm.util not found, 
required by fr.umlv.lazystaticfinal

which suggests that org.objectweb.asm.util wasn't observable. Running 
-Xlog:init-debug should have reveal more for that case.

It looks like you've got past that now and are hitting the same 
VerifyError. In the launcher, the resources corresponding to the two 
cases are java.launcher.cls.error7 and java.launcher.module.error5 so I 
would expect the exception message from the VerifyError to be printed in 
both. I suspect you'll need to run with -verbose and look at the class 
loading order to give some hint as to whether the message may be getting 
lost.

-Alan


More information about the core-libs-dev mailing list