Reputation: 2062
I have been attempting to install Clojure on Ubuntu using the directions found here:
http://riddell.us/ClojureOnUbuntu.html
For starters, that version of Java no longer seems to be supported- so I installed the Open JDK version 7 and have been attempting to use ant with that. Problem is, whenever I type sudo ant
to begin the build in the Clojure folder, I get:
Unable to locate tools.jar. Expected to find it in /usr/lib/jvm/java-6-openjdk/lib/tools.jar
Buildfile: /home/nathan/opt/clojure/build.xml
And then eventually:
BUILD FAILED
/home/nathan/opt/clojure/build.xml:40: java.lang.UnsupportedClassVersionError: com/sun
/tools/javac/Main : Unsupported major.minor version 51.0
Note that at first it would fail because it could not locate tools.jar
, but then I copied tools.jar
from the jvm
directory where the most recent version was located to usr/share/ant/lib
to try and make it work. Anyone have leads or advice how to get this to work?
Thank you kindly!
Upvotes: 3
Views: 385
Reputation: 91577
My apologies for the lingering outdated documentation from
The bad old days before leiningen, and zi (clojure maven plugin)
Nobody* installs clojure anymore in the sense that you would install any other program, instead they install a standard java build tool (Maven2/3) and then use that tool to build their clojure programs. both leiningne and zi are built ontop of maven and you should choose between them. There is still some lingering traces of the days when people built Clojure code with Ant and if you come across one of these (and have no explicit reason to use And) ignore it and try lieningen or zi.
Upvotes: 3
Reputation: 40005
For the most part, the Clojure material on riddell.us is insanely out of date and should be completely ignored and banished from all Clojure search results. With that in mind, if you'd just like to do some Clojure development on Ubuntu, simply install Leiningen, create a new project (lein new my-project
) and start hacking. Generally, you never "install" Clojure on your system. It's used as a library of your project, which is handled by Leiningen.
On the other hand, if you actually want to hack on Clojure itself, follow the build instructions in the README on the Clojure github page.
Upvotes: 2