GNU-style options for the Jar Tool

kedar mhaswade kedar.mhaswade at
Wed Jan 20 21:33:30 UTC 2016

Looks good!

I suggest we use -h (in addition to or instead of -?) for help.
I believe saying "GNU-style" means the boolean short options
(e.g. -t, -v) can be combined (like -tv) to specify multiple actions, but
maybe the compatibility interface should mention that that is the case.

Will displaying manifest contents (especially the main-class attribute, if
any) be a worthwhile option to explore or will that be out of scope for
this one? Usually, I end up unjar-ing META-INF/MANIFEST.MF just to see what
the main-class is.


On Wed, Jan 20, 2016 at 12:05 PM, Alan Bateman <Alan.Bateman at>

> On 19/01/2016 16:54, Chris Hegarty wrote:
>> GNU-style options for Jar Tool
>> Prompted by the impending addition of new options for both multi-release
>> jars
>> and jigsaw, it became immediately obvious that we were running out of
>> single
>> characters that could be used to represent these new options. I'd like to
>> propose an update to the Jar Tool CLI to accept GNU-style options ( all
>> short
>> forms being compatible with the existing current options ), so that we can
>> evolve the CLI in a reasonable fashion going forward.
> This looks quite good. For me at least then I know it will take time to
> get used to typing --file=FILE.
> The only option that I wonder about is --pack200 as it hints that it does
> pack200 compression. Should it be --normalize instead? The help output
> might not even need to mention pack200.
> The only other comment is something that Stephen Colebourne brought up on
> jigsaw-dev a few months ago. The updated `jar --help` is too long. The
> useful options scroll up to leave the user looking at options under the
> "Compatibility Interface" heading. I wonder if it would be better to move
> this to --help:compat.
> -Alan.

More information about the core-libs-dev mailing list