module file reading/writing

Dalibor Topic Dalibor.Topic at Sun.COM
Thu Feb 25 10:07:33 PST 2010


Hi,

I've pushed an initial implementation of the reader/writer code
for the module format specified in [1].

It adds a new 'jmod' verb to jpkg. So if you'd want to turn a 'hello'
module at version 0.1 on disk into a jmod file, you'd do this:

jpkg -m hello jmod hello

and get a hello at 0.1.jmod file.

If the module has resources, etc you can tell jpkg about the
directories to add to a module using:

-r dir for resources
--natlib dir for native libraries
--natcmd dir for native commands
--config dir for configuration data

In addition you can specify a directory to create the jmod file
into using -d dir option.

Within each module file section, regular files are gzipped, while
classes are pack200 compressed.

In order to extract a jmod file, you can use the jmod tool, for
example

jmod extract hello at 0.1.jmod

will extract the module file into the 'hello' directory. Sections
other then classes are extracted into subdirectories.

There is an initial set of module format tests, with more to come,
as I hack on improving the code. Please try it out, and tell me
if it works, breaks, etc.

cheers,
dalibor topic

[1] http://cr.openjdk.java.net/~mr/jigsaw/notes/module-file-format/
-- 
*******************************************************************
Dalibor Topic 			Tel: (+49 40) 23 646 738
Java F/OSS Ambassador 		AIM: robiladonaim
Sun Microsystems GmbH 		Mobile: (+49 177) 2664 192
Nagelsweg 55 			http://openjdk.java.net
D-20097 Hamburg 		mailto:Dalibor.Topic at sun.com
Sitz der Gesellschaft: Sonnenallee 1, D-85551 Kirchheim-Heimstetten
Amtsgericht München: HRB 161028
Geschäftsführer: Thomas Schröder, Wolfgang Engels
Vorsitzender des Aufsichtsrates: Martin Häring



More information about the jigsaw-dev mailing list