TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Creating Executable Jars For Your Clojure App

28 pointsby kyleburtonalmost 16 years ago

3 comments

patio11almost 16 years ago
As a B2C Java developer, I have to say it: don't distribute jars to end users. The user experience is horrific. Knowing how to make executable jars is valuable, just make sure it is the step in your ant file right before you execute your native wrapping.<p>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.<p>Launch4j: packs jars into self-contained .exes, with all the trimmings. Includes ant integration. <a href="http://launch4j.sourceforge.net/" rel="nofollow">http://launch4j.sourceforge.net/</a><p>JarBundler: an Ant task which packs jars into Mac applications <a href="http://jarbundler.sourceforge.net/" rel="nofollow">http://jarbundler.sourceforge.net/</a><p>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.<p>(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.)<p>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.)
评论 #678370 未加载
burkealmost 16 years ago
Somebody might find this useful: <a href="http://github.com/burke/cljtemplate" rel="nofollow">http://github.com/burke/cljtemplate</a> -- a barebones template project for clojure, using ant, with compilation for java and clojure source.
jamesbrittalmost 16 years ago
Something like Rawr would be good.<p><a href="http://rawr.rubyforge.org/" rel="nofollow">http://rawr.rubyforge.org/</a>