Source

clojurewise / embedded.pl

#!/usr/bin/env perl
# Standalone script with embedded jar

# Jar file, we use the user name to avoid collision with other users and version
# to make upgrading possible
$verison = "3.1.4";
$jar = "/tmp/lp-$ENV{USER}-$version.jar";

# Extract jar if not there
unless (-e $jar) {
    open DECODE, "|base64 -d > $jar" or die "can't open base64 pipe";
    print DECODE <DATA>;
}

# This will replace the current process with the java one
exec "java", "-jar", $jar, @ARGV

__DATA__
YOUR BASE64 ENCODED JAR GOES HERE