2014-11-21 31 views
2

我试图通过Clojure-koans学习Clojure;然而,Clojure的-koans无法运行:Clojure-koans运行错误:

~/Downloads/clojure-koans-2012-10-18_18-42/script $> ./run 
Picked up _JAVA_OPTIONS: -Dawt.useSystemAAFontSettings=on -Dswing.aatext=true -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel 
Error: Could not find or load main class clojure.main 

但我可以通过lein repl开始的Clojure。并通过emacs cider-jack-in

我应该怎么做才能让Clojure-koans运行?

编辑:问题在src文件夹中project.clj通过编辑解决的依赖关系: (改为最新的Clojure 1.6.0)

:dependencies [[org.clojure/clojure "1.6.0"] 

我应该回答我的问题?或者我如何将问题标记为已解决?

回答

2

你在项目中运行lein deps吗?从文档(https://github.com/functional-koans/clojure-koans):

The only things you'll need to run the Clojure Koans are:

JRE 1.5 or higher

clojure-1.5.1.jar

You can use Leiningen to automatically install the Clojure jar in the right place. Leiningen will also get you a couple more jarfiles, including JLine, which allows you some of the functionality of readline (command-line history, for example).

1

我建议要么cd .. && ./script/run(我猜的shell脚本可以假设正在运行一个目录上)或克隆的Clojure-koans回购,并从项目的根运行lein koan run(也目录)。

+0

'lein koan run'为我工作,谢谢 – ecoologic 2015-04-15 12:07:01