tags:

views:

178

answers:

1

What is the easiest way to make a clojure app into an executable like http://rawr.rubyforge.org/ does for ruby? (exe and app files too)

+8  A: 

Use leiningen and build an uberjar(standalone jar that contains all dependencies) from the project.

As Alex Ott mentions in the comment to my answer, another may to build your app is to use Maven + Clojure plugin for maven. Afterward you may use a tool such as IzPack to generate an installer or an executable wrapper for your jar artifact. You may use IzPack with leiningen as well of course - it doesn't care about the build system at all - only about the resulting files :-)

After you have the uberjar there are many option to wrap it in a native executable launcher for windows - izpack2exe, jsmooth, jar2exe, executor, etc...

Bozhidar Batsov
I use maven with assembly plugin to build big jar with all content. And I also use maven + izpack-plugin to build installers for my applications
Alex Ott
I use IzPack myself, but forgot to mention it. Thanks for the great comment, I'll extend my answer.
Bozhidar Batsov
Clojuresque (the Clojure plugin for gradle) also provides an uberjar task, which builds a standalone jar for an application.
kotarak
I don't want an installer. I just want to convert the jar to an app and exe.
VectorBEAR
I've updated my answer.
Bozhidar Batsov
lein uberjar, couldn't be more simple, best option IMHO
Humberto Pinheiro