Allow ModuleInfoExtender to be used externally

Oliver Siegmar oliver at siegmar.de
Wed Aug 9 14:39:49 UTC 2017


Hello,

I have to create a Java 9 modularized jar file programmatically.

I noticed, that the compiled module-info.class file gets modified (main-class, module-version and modules-hash) by the jar command line tool (using jdk.internal.module.ModuleInfoExtender).

Unfortunately, neither the ModuleInfoExtender itself nor the used asm-lib is exported to allow external use. Is it planned to change this in the final release of Java 9?


I think, it is a bit scary, that the binary version of module-info.class gets manipulated to create a jar file. Having to re-implement this functionality in 3rd party tools (like Ant, Maven, Gradle, etc.) doesn’t make it better ;-)


Bye

Oliver



More information about the jigsaw-dev mailing list