简体   繁体   English

在Clojure中使用逆时针编译问题

[英]Problems compiling in clojure with Counterclockwise

Hi am totally new to clojure, and have just installed clojure and CounterClockwise. 嗨,您对Clojure完全陌生,并且刚刚安装了Clojure和CounterClockwise。 I have created a new clojure project named "myproject". 我创建了一个名为“ myproject”的新clojure项目。 Entering (foo "test") gives : "test Hello, World!" 输入(foo "test")给出:“ 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: 当我在导航器中选择“ myproject”并以Java编译->编译clojure.lang运行时,出现以下错误:

ERROR: Must set system property clojure.compile.path to the location for compiled .class files. 错误:必须将系统属性clojure.compile.path设置为已编译.class文件的位置。 This directory must also be on your CLASSPATH. 此目录也必须在您的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 . 通常建议您使用Clojure构建工具leiningen (又名“ lein”)创建项目,并使用它创建项目并管理依赖项等。逆时针自动检测lein项目 Lein will create a file called project.clj that defines things like compile and source paths as well as the the main class. Lein将创建一个名为project.clj的文件,该文件定义诸如编译路径和源路径以及主类之类的内容。

It seems like the eclipse builtin jar creation tool has some problems. 看来eclipse内置jar创建工具存在一些问题。 CCW recommends to install a plugin for eclipse to create a fat jar: http://fjep.sourceforge.net/ CCW建议为Eclipse安装一个插件来创建一个胖子罐: http : //fjep.sourceforge.net/

CCW documentation: http://doc.ccw-ide.org/documentation.html#_create_a_fat_executable_jar_with_all_dependencies_packaged_into CCW文档: 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. 我仍然想强调使用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. 以后无论做什么,都可以轻松地将leiningen集成到您的构建过程中,它独立于您使用的IDE,也独立于操作系统。

There are a lot more advantages you get with leiningen (existing plugins, templates, community support, ...). 使用leiningen还有很多其他优点(现有的插件,模板,社区支持等)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在日食中运行clojure(逆时针) - running clojure in eclipse (counterclockwise) 用CounterClockwise和Eclipse评估Clojure REPL - Evaluation in Clojure REPL with CounterClockwise and Eclipse 如何在带有逆时针方向的Eclipse中使用已编译的Clojure类 - How to use a compiled Clojure class in Eclipse with Counterclockwise 如何在Eclipse / CounterClockWise中重新格式化/重新生成Clojure代码? - How to reformat/reindent Clojure code in Eclipse/CounterClockWise? 无法在Eclipse逆时针Clojure插件中创建项目 - Cannot Create Project in Eclipse Counterclockwise Clojure Plugin 编译Clojure? - Compiling Clojure? IDE for Clojure-逆时针(Eclipse)vs Emacs。 与Emacs相比,缺少逆时针的哪些功能(如果有)? - IDE for Clojure - Counterclockwise(Eclipse) vs Emacs. What (if any) features Counterclockwise is missing comparing to Emacs? Eclipse(逆时针)-新的Clojure项目:[Exception]无法加载模板,Leiningen - Eclipse (Counterclockwise)- New Clojure Project: [Exception] Could not load template, Leiningen 如何使用Eclipse和CounterClockwise查看Clojure函数的调用层次结构 - How to see a Clojure function's call hierarchy using Eclipse and CounterClockwise 如何通过逆时针(或la clojure)运行/调试compojure web应用程序 - How to run/debug compojure web app via counterclockwise (or la clojure)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM