RFR: jpkg contents/show commands

Paul Sandoz paul.sandoz at oracle.com
Mon May 21 08:30:58 PDT 2012


On May 21, 2012, at 5:10 PM, Chris Hegarty wrote:
> 
>>> Also, included is various cleanup and restructuring, especially to ModuleFile, to put in place a structure to more easily support new compression algorithms. Specifically LZMA. I have a prototype from last year I need to rebase.
>>> 
>>> For now, 'contents' and 'show' are only added jpkg, but I could see that these may be useful before installing a module into the module library, so could be applicable to the jmod command also? Or just jmod?
>>> 
>> 
>> Is "jpgk show<mf>" the equivalent of "jmod ls<midq>  -v" for a module id query that matches one module?
> 
> Right, but "jmod ls <midq>" can only be run after the module has been installed. It may be nice to know what is in a module before you install?
> 

Agreed, i was more requesting a confirmation of my understanding rather than questioning the value :-)


>> Seems useful to list the contents of a module installed to a library, but i dunno if it is quite the same thing as listing the contents of the module itself.
> 
> I see this more of a debugging/sanity tool. This issue was raised on the list a few weeks ago by David [1] who was trying to validate the contents of his built module files.
> 

OK.


>> 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?


> Or maybe you're asking about something like an export facility from the module library?
> 

This too.

The use-case is for tools and IDEs that need to scan class files i.e. a simple, not very efficient solution, until there are proper APIs in place to help scan for classes in jmod packages and and libraries.


>>> If these new commands are to stay in jpkg long term we should probably change the command that builds the jmod/deb files to create/build, so 'jpkg create ... jmod'.
>>> 
>> 
>> Yes.
>> 
>> What about for modular jar files?
> 
> That's next on my list ;-) I really like the idea of a 'create' command that can take an argument to determine what type of package to create,
>   jpkg create ... [jmod|deb|jar|ips|...]
> 

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).

Paul.


More information about the jigsaw-dev mailing list