I'm trying to understand how to package a command line application written in Clojure for distribution. I don't want users to have to use java -jar myproject.jar arg1 arg2
to run the program. PHP has something called "Phar" files, which are basically executable zip files, so they include a shebang that tells POSIX systems how to unpack and run them.
I've seen other Clojure apps that allow the jar file to be set chmod +x
and then executed directly. How do they achieve this? Uberjar just seems to make a jar that requires the java -jar
prefix.