Jar tool to transform a plain old JAR file to a modular JAR

Mandy Chung mandy.chung at oracle.com
Fri Apr 8 15:08:41 PDT 2011


  On 4/8/11 2:21 PM, Sean Mullan wrote:
>> The jar tool will provide the following new options for
>> generating a module definition file in a jarfile:
>>
>> --module={module-name @ version}
>
> This looks like the spaces around the '@' are required.
>

No space allowed would be simpler.

>> Generate META-INF/module-info.class entry in the JAR file.
>> * jarfile name tends to be unnamed or contains '-' character.
>> The module name will not be inferred from the jarfile name.
>> --module-info-java={dir}
>> Output module-info.java in the specified directory.
>
> Is this option optional? Will it output to the cwd by default? 

I'm thinking this option must be specified to generate module-info.java 
file and the module-info.java should be placed in the source tree.  
Otherwise, if jar --module option is invoked during their build process 
that I think would be the primary use of this option, it would either 
turn off generating module-info.java with another option or the 
generated module-info.java is ignored.

Perhaps jar -v option can print the module-info.java to stdout.

Mandy



More information about the jigsaw-dev mailing list