Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a distributable application in Clojure?

Tags:

java

clojure

What is the 'least work' approach to distributing a Clojure application? And is this different from the 'best' approach?

For example here is a trivial 'application' that I want to be able to send to someone:


(doto (javax.swing.JFrame. "Hello World")
  (.add (javax.swing.JLabel. "Clojure Distributable"))
  (.pack)
  (.show))

I imagine it makes a big difference to the answer whether they have Java installed already or not.

like image 768
Timothy Pratley Avatar asked Dec 13 '22 02:12

Timothy Pratley


1 Answers

For Mac Os x, java is installed by default and apple provides JarBundler that allows you to turn jars in to native os x applications. OS X applications don't use installers.

For Windows Launch4j is a good choice it will wrap your jar into .exe with an icon also it will check if java is installed if not download it. For a windows installer i recommend NSIS (winamp's installer).

For Linux, jar file + bash script.

like image 167
Hamza Yerlikaya Avatar answered Jan 19 '23 04:01

Hamza Yerlikaya