Another simple way is to embed the jar in a script (we'll use base64 here). And then have the script extract the jar and run Java on it. (Note that I'm using the base64 utility that comes with Linux, you can probably use MIME::Base64 as well).
EDIT: Seems like there is a simpler solution.
Or if you are using cake you can just run:
ReplyDelete$ cake bin
And it will generate a similarly encoded, executable jar file.