commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Stefan Bodewig <>
Subject Re: [compress] A few comments
Date Wed, 18 Jun 2008 09:19:11 GMT
On Wed, 18 Jun 2008, Emmanuel Bourg <> wrote:

> Stefan Bodewig a écrit :
>> On Solaris a file with the extension .jar whose first ZIP extra
>> field has the ID 0xCAFE (and is otherwise empty) is considered
>> executable and automatically handed of to Java as a "shell".
>> The jar tool in Sun's JDK adds this extra field and so does Ant's
>> jar task.
> Is it only added if the manifest has a Main-Class attribute ?

Not sure what the jar CLI tool does, but Ant always adds it (I just
looked into the code).

It has to be the first extra field of the directory entry of META-INF/
- which in turn has to be the very first entry IIRC.

<> confirms

If you try it on a jar without a main class you'll get the exact same
effect as running java -jar manually.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message