我下载了Clojure 1.2 https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip,摘录在Library目录下,创建了CLOJURE_HOME, 添加了CLURE_HOME/script to my$PATH。
当Im试图操作cl或翻版面具时,我会发现这一错误:
Exception in thread "main" java.lang.NoClassDefFoundError: jline/ ConsoleRunner Caused by: java.lang.ClassNotFoundException: jline.ConsoleRunner at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Ok, jline. CLCSATH中的jar,因此我检查了cl和script:
CLASSPATH=src/clj:test:test-classes:classes/:script/jline-0.9.94.jar:../clojure-contrib/target/clojure-contrib-1.2.0-SNAPSHOT.jar
if [ -z "$1" ]; then
exec java -server jline.ConsoleRunner clojure.main
else
SCRIPT=$(dirname $1)
export CLASSPATH=$SCRIPT/*:$SCRIPT:$CLASSPATH
exec java -Xmx3G -server clojure.main "$1" "$@"
fi
我下载了jline。 根据CLOJURE_HOME/script,但Im仍然有同样的错误。
This lead me to the question:
What is the role of https://github.com/downloads/clojure/clojure/clojure-1.2.0.zip anyway?
Is it supposed to be used to install Clojure? or just to to build and get clojure.jar?
I noticed no one is talking about installing Clojure this way.
Am I missing something?