Tom Tallak Solbu
Tom Tallak Solbu

Reputation: 559

Problems compiling in clojure with Counterclockwise

Hi am totally new to clojure, and have just installed clojure and CounterClockwise. I have created a new clojure project named "myproject". Entering (foo "test") gives : "test Hello, World!" just as expected. When I select the "myproject" in the navigator, and run as Java compilation -> Compile clojure.lang, I get following error:

ERROR: Must set system property clojure.compile.path to the location for compiled .class files. This directory must also be on your CLASSPATH.

What does this mean? How do I fix this?

Upvotes: 1

Views: 171

Answers (2)

sveri
sveri

Reputation: 1389

It seems like the eclipse builtin jar creation tool has some problems. CCW recommends to install a plugin for eclipse to create a fat jar: http://fjep.sourceforge.net/

CCW documentation: http://doc.ccw-ide.org/documentation.html#_create_a_fat_executable_jar_with_all_dependencies_packaged_into

I still want to emphasize on using leiningen. Whatever you will do later, it is easy to integrate leiningen into your build process, it is independent of the IDE you use and also OS independent.

There are a lot more advantages you get with leiningen (existing plugins, templates, community support, ...).

Upvotes: 1

Arthur Ulfeldt
Arthur Ulfeldt

Reputation: 91617

It's generally recommended that you create your projects with the Clojure build tool leiningen (aka "lein"), and use that to create the projects and manage the dependencies etc. counterclockwise detects lein projects automatically. Lein will create a file called project.clj that defines things like compile and source paths as well as the the main class.

Upvotes: 1

Related Questions