Created
January 17, 2011 05:21
-
-
Save spullara/782523 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# simple script for turning a jar with a Main-Class | |
# into a stand alone executable | |
# cat [your jar file] >> [this file] | |
# then chmod +x [this file] | |
# you can now exec [this file] | |
commandToRun="$(printf "%q " "$@")" | |
if test "$commandToRun" = "'' "; then | |
eval "exec java -Xmx1G -jar $0" | |
else | |
eval "exec java -Xmx1G -jar $0 $commandToRun" | |
fi |
This doesn't seem to work any more 😞
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nice discovery! This can be simplified to a single line: https://gist.github.com/782862