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 17:48:01 UTC 2019


On 23/03/2019 15:49, forax at univ-mlv.fr wrote:
> :
> found the issue, it's more simple :)
>
> If you take a look to the error message, the module name is printed twice:
>   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
>
> so the issue is here
>    http://hg.openjdk.java.net/jdk/jdk/file/c81fbf340ceb/src/java.base/share/classes/sun/launcher/resources/launcher.properties#l245
> it should be
>    Caused by: {2}: {3}
> instead of
>    Caused by: {1}: {2}
> because {1} is the name of the module, not the name of the exception.
>
Good sleuthing, I've created JDK-8221368 to track this.

-Alan


More information about the core-libs-dev mailing list