简体   繁体   中英

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?

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.

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, ...).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM