【发布时间】:2009-03-03 17:37:14
【问题描述】:
我一直在尝试在 Clojure 中编译一个非常简单的 test.clj,但没有成功。我在Clojure Google Group 上有一个thread,有几个回复,但没有任何帮助。快速总结一下,这是我的 clojure 文件:
(ns test.test
(:gen-class))
(defn -main
[gre]
(println (str "Hello " gre)))
基本上就是Clojure documentation中提供的示例文件。
我已将此文件适当地放在clojure/src/test/test.clj 中,并且应该能够使用(compile 'test.test) 进行编译,但我一直收到错误:
java.io.IOException: The system cannot find the path specified (test.clj:1)这让我相信这是一个类路径问题。我尝试使用Clojure documenation 中给出的所有标准命令以及来自线程
java -classpath .;src;classes;clojure.jar clojure.main 的最新建议运行Clojure。
如果有帮助,我的文件系统如下所示:
-+-clojure
+-classes/
+-+-src/
| |-+-test/
| | \-test.clj
+-\-test.clj
+-test.clj
+-clojure.jar
附:我在 Vista Ultimate 上运行,所以它可能可能是权限问题,但我检查了权限并没有发现任何问题。
【问题讨论】:
标签: java clojure compilation classpath