> On 8/9/17 7:35 PM, mandy chung wrote: > ModuleInfoExtender is JDK internal API and not planned to be exported/opened. > New version of ASM supports module-info.class. You can probably try out ASM > 6 alpha version for now.
Thank you for clarifying. So, an external library (ASM) is required to build modularized Jar files — the JDK offers no built-in support for that (except the JAR command line tool). I’m very surprised as I think it is JDKs job to offer this functionality to 3rd party tools (as it does it with the compiler and other aspects of building and packaging Java applications). >> 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 ;-) > > To be clear, the jar tool does not change Module attribute but it may add > optional attributes. I don't see how it can be scary to you. Well, it remembers me of the pre-XML era and all the problems we had that time with binary data and protocols — this is why it scares me. I bet, that the module-info would be a XML file if Jigsaw would have been released in 2000 :-). Anyway, forcing 3rd party tools to re-implement this mechanism is asking for trouble IMO. - Oliver