You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Stefan Bodewig <bo...@apache.org> on 2009/02/13 06:32:40 UTC

[compress] JarMarker

Hi,

Solaris contains some special code which allows people to mark jar
files executable and run them as if they were native commands.  It
will only work for jars that contain the sequence 0xCAFE (in
big-endian order) somewhere at the beginning, which is achieved by
adding an extra field with that header id.

See <https://issues.apache.org/bugzilla/show_bug.cgi?id=32649>

This is the already existing JarMarker extra field in compress.

Ant's <jar> task adds this extra field to the META-INF directory
because it knows this is always going to be the very first entry for
Ant created jars.

I propose to modify JarArchiveOutputStream to add a JarMarker extra
field to the very first entry written to the stream.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [compress] JarMarker

Posted by Stefan Bodewig <bo...@apache.org>.
On 2009-02-13, Stefan Bodewig <bo...@apache.org> wrote:

> I propose to modify JarArchiveOutputStream to add a JarMarker extra
> field to the very first entry written to the stream.

done.

Stefan

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [compress] JarMarker

Posted by Wolfgang Glas <wo...@ev-i.at>.
Torsten Curdt schrieb:
>> Solaris contains some special code which allows people to mark jar
>> files executable and run them as if they were native commands.  It
>> will only work for jars that contain the sequence 0xCAFE (in
>> big-endian order) somewhere at the beginning, which is achieved by
>> adding an extra field with that header id.
>>
>> See <https://issues.apache.org/bugzilla/show_bug.cgi?id=32649>
>>
>> This is the already existing JarMarker extra field in compress.
>>
>> Ant's <jar> task adds this extra field to the META-INF directory
>> because it knows this is always going to be the very first entry for
>> Ant created jars.
>>
>> I propose to modify JarArchiveOutputStream to add a JarMarker extra
>> field to the very first entry written to the stream.
> 
> Makes sense +1

I double this opinion +1

sum: +2

  Wolfgang

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org


Re: [compress] JarMarker

Posted by Torsten Curdt <tc...@apache.org>.
> Solaris contains some special code which allows people to mark jar
> files executable and run them as if they were native commands.  It
> will only work for jars that contain the sequence 0xCAFE (in
> big-endian order) somewhere at the beginning, which is achieved by
> adding an extra field with that header id.
>
> See <https://issues.apache.org/bugzilla/show_bug.cgi?id=32649>
>
> This is the already existing JarMarker extra field in compress.
>
> Ant's <jar> task adds this extra field to the META-INF directory
> because it knows this is always going to be the very first entry for
> Ant created jars.
>
> I propose to modify JarArchiveOutputStream to add a JarMarker extra
> field to the very first entry written to the stream.

Makes sense +1

cheers
--
Torsten

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@commons.apache.org
For additional commands, e-mail: dev-help@commons.apache.org