Skip to content

Instantly share code, notes, and snippets.

#!/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