安装compojure
按照 http://en.wikibooks.org/wiki/Compojure/Getting_Started 中的说明进行操作,我:
- 下载了 http://github.com/weavejester/compojure/tarball/0.3.2
- 提取到 ~/compojure
- chdir 到那里
- 更改可执行文件的权限
- run ant deps
- ant
- run export CLASSPATH=~/compojure/compojure.jar
- 创建 compojure shell 脚本
- Clojure 源文件
- chdir 到那里
- 运行 ./compojure hello.clj
然后,我得到:
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Script
Caused by: java.lang.ClassNotFoundException: clojure.lang.Script
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: clojure.lang.Script. Program will exit.
我尝试更改 Compojure shell 脚本以使用完整的类路径,但仍然不起作用。
为什么不呢?如何安装Compojure?
Following the instructions in http://en.wikibooks.org/wiki/Compojure/Getting_Started, I:
- downloaded http://github.com/weavejester/compojure/tarball/0.3.2
- extracted to ~/compojure
- chdir to there
- changed permission to executable
- run ant deps
- ant
- run export CLASSPATH=~/compojure/compojure.jar
- created compojure shell script
- Clojure source file
- chdir to there
- run ./compojure hello.clj
Then, I got:
Exception in thread "main" java.lang.NoClassDefFoundError: clojure/lang/Script
Caused by: java.lang.ClassNotFoundException: clojure.lang.Script
at java.net.URLClassLoader$1.run(URLClassLoader.java:217)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: clojure.lang.Script. Program will exit.
I tried changing Compojure shell script to use full classpath, but still didn't work.
Why not? How to install Compojure?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
该页面已过时。
您应该遵循 compojure 开发人员的以下说明:
https://github.com/weavejester/compojure/wiki/Getting-Started
That page is outdated.
You should follow these instructions from compojure developers:
https://github.com/weavejester/compojure/wiki/Getting-Started