RFR: jpkg contents/show commands

Paul Sandoz paul.sandoz at oracle.com
Tue May 22 02:15:41 PDT 2012


On May 21, 2012, at 5:45 PM, Chris Hegarty wrote:
> 
> On 21/05/2012 16:30, Paul Sandoz wrote:
>> ....
>> 
>>>> A useful addition, not suggesting for this patch, is the ability to
>>>> extract out jar/class files from a jmod package or a module installed
>>>> into a library.
>>> 
>>> 'jmod extract <module-file>' will extract the contents of a module
>>> file to the file system. Is this what you are looking for?
>> 
>> Yes, will it always extract to a zip of classes or reuse the same
>> compression in the module e.g. pack200?
> 
> The current implementation extracts to a zip classes archive.
> 

OK.


>> Me too. Does it makes sense for the "jar" command to be reused for
>> creating a modular jar? (perhaps in addition to that of jpkg for
>> consistency).
> 
> Thanks to Mandy we already have support for modular jars in the jar command :-) I think we just need to add it to jpkg for consistency, as you said.
> 

Thanks. I just verified i can jar up compiled classes in modular class layout and install such a jar into a library. It has the virtue that it works directly with the ant jar task :-)

However, "jrepo <repo> add" does not work with modular jar files.


When using jar it is up to the user to name the jar file with say the version number. For jpkg i guess it makes sense to use the same naming approach as for creating jmod files.

Paul.


More information about the jigsaw-dev mailing list