On 02/06/2016 02:02, Steve Drach wrote:

Hi,

Please review the following changeset that makes it easier to create 
multi-release jar files with jar tool.

webrev: http://cr.openjdk.java.net/~sdrach/8114827/webrev.01/
issue: https://bugs.openjdk.java.net/browse/JDK-8114827

The changeset is the implementation of a new command line option, —release n, 
that indicates all following files and directories are placed in the 
META-INF/versions/n directory of a multi-release jar file.  The new command 
line syntax is

jar [OPTION...] [ [--release VERSION] [-C dir] files] …

An example is

jar --create --file mr.jar README -C foo classes --release 9 -C foo9 classes 
Foo.class

This will put README and all the files under foo/classes in the base (or root) 
directory of a jar file and put Foo.class and all the files under foo9/classes 
in the META-INF/versions/9 directory of the jar file.
I don't have time to do a detailed look at the code but `--release 9 -C <dir> ...` looks quite good. It does mean mixing of option styles.

One thing to check is that the `jar -help` output is clean. It looks like it might wrap which can look messy (the usage output from `jlink` had to be cleaned up recent months on this specific point).

On terminology then then usage has "versioned area" in one place, "versioned directory" in another. I thought the JarFile javadoc was using "versioned section" at one point but I don't see it now. Anyway, just pointing this out to make sure that it is consistent.

-Alan


Reply via email to