Creating Executable Jars For Your Clojure App
asymmetrical-view.com
asymmetrical-view.com
Java build tools are wonderfully cross platform so you can use the following pair regardless of your development environment, as far as I know. I routinely build BCC for Macs on Windows Vista.
Launch4j: packs jars into self-contained .exes, with all the trimmings. Includes ant integration. http://launch4j.sourceforge.net/
JarBundler: an Ant task which packs jars into Mac applications http://jarbundler.sourceforge.net/
You need a file called JavaApplicationStub to get JarBundler to work. Macs can apparently produce it with software that comes onboard. I got mine by outsourcing wrapping of the very first Mac version of BCC to somebody on RentACoder, and since they I've just copy/pasted every time I've done a version upgrade. I really don't understand the internals of Java Mac applications, but I think you can also copy/paste any JavaApplicationStub you encounter on the Internet, if you're also developing on a non-Mac platform.
(Wrapping isn't quite the last thing you'll need to do to make a Java app cross-platform -- ask me some time about the joys of finding a good directory to store settings in -- but it is a low-effort absurdly-high-reward step to take.)
I don't have any experience with deploying B2C Java apps to Linux users so I don't know what I'd do for wrapping it there. (While I will probably never write B2C for Linux users, I would be interested if someone with experience with it shared what they did.)
I distribute jars with JotBot, a desktop app written in JRuby. It has native installers for Win 32 and OSX; jars are just more files dropped off in a folder, and the user need never think about them, since kicking off the app is handled by a some native launcher.
Anyhow, one of the footnotes was that there is this package called Rawr which gives you a Ruby option for packaging a minimal JRuby install with the application and giving it a nice native-esque packaging experience.
(Come to think of it, wasn't JotBot the sample application at that presentation? I remember it being a timetracking app but don't have my notes in front of me.)
Rawr is used to package up JRuby apps, including JotBot.
The apps don't have to be made with Monkeybars to use Rawr, and it may be possible to take a compiled Clojure app and make a redistributable package using Rawr. If not, I'm sure Rawr could be ported to Clojure (Cawr?) to make life easier.