On 10/08/2017 08:29, Oliver Siegmar wrote:
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).


One thing to point out is that the jar tool CLI is a documented/supported interface so you can use the j.u.spi.ToolProvider API to find the "jar" tool and invoke it with the documented/supported options. That provides another way to build or update modular JARs without needing to use the j.u.jar API.

-Alan

Reply via email to