gradle-executable-jar-plugin icon indicating copy to clipboard operation
gradle-executable-jar-plugin copied to clipboard

Make 'really executable' jars

Open stigkj opened this issue 12 years ago • 2 comments

This is done by prepending a shell script to the resulting jar file that executes itself through java. Such a shell script could in its simplest form look like this:

#!/bin/sh
exec java -jar "$0" "$@"

A default script should be provided, but it should be possible to override this with one's own.

As the ZIP-spec states that a zip-file can have anything before the real zip begins, it should not pose a problem doing this all the time. This means there is no use for an option turning this on/off.

stigkj avatar Sep 14 '13 11:09 stigkj

I built on your plugin to add this functionality in a new plugin called "jarsh"

https://github.com/cinchapi/jarsh

jtnelson avatar Jul 12 '14 14:07 jtnelson

really?

iready avatar Mar 11 '16 12:03 iready