I'm following the examples from the book 'Programming Clojure', and I'm at page 17 to run (require 'example.introduction).
I have set clojure at ~/bin/clojure as follows
java -server \ -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8888 -cp ... clojure.lang.Repl
The -cp contains . (current directory). When I try it with clojure, I get the following error message.
Exception in thread "main" java.lang.ExceptionInInitializerError at clojure.lang.Repl.(Repl.java:23) Caused by: java.lang.RuntimeException: java.lang.NoSuchMethodError: clojure.lang.MultiFn.(Ljava/lang/String;Lclojure/lang/IFn;Ljava/lang/Object;Lclojure/lang/IRef;)V (utils.clj:0) at clojure.lang.RT.(RT.java:290) ... 1 more Caused by: java.lang.NoSuchMethodError: clojure.lang.MultiFn.(Ljava/lang/String;Lclojure/lang/IFn;Ljava/lang/Object;Lclojure/lang/IRef;)V (utils.clj:0) at clojure.lang.Compiler.eval(Compiler.java:4153) at clojure.lang.Compiler.load(Compiler.java:4470) at clojure.lang.RT.loadResourceScript(RT.java:327) at clojure.lang.RT.loadResourceScript(RT.java:316) at clojure.lang.RT.load(RT.java:406) at clojure.lang.RT.load(RT.java:376) at clojure.core$load__4557$fn__4559.invoke(core.clj:3427) at clojure.core$load__4557.doInvoke(core.clj:3426) at clojure.lang.RestFn.invoke(RestFn.java:413) at clojure.core$load_one__4520.invoke(core.clj:3271) ... at clojure.lang.RT.loadResourceScript(RT.java:327) at clojure.lang.RT.loadResourceScript(RT.java:312) at clojure.lang.RT.maybeLoadResourceScript(RT.java:308) at clojure.lang.RT.doInit(RT.java:430) at clojure.lang.RT.(RT.java:286) ... 1 more Caused by: java.lang.NoSuchMethodError: clojure.lang.MultiFn.(Ljava/lang/String;Lclojure/lang/IFn;Ljava/lang/Object;Lclojure/lang/IRef;)V at clojure.contrib.duck_streams__init.load(Unknown Source) at clojure.contrib.duck_streams__init.(Unknown Source) ... at clojure.lang.Compiler.eval(Compiler.java:4142) ... 28 more
I tried to run clojure as follows.
alias clojure='java -jar $JARDIR/clojure.jar '
But it doesn't have the CLASSPATH that I setup in .bashrc correctly, when I run the command as follows.
(println (seq (.getURLs (java.lang.ClassLoader/getSystemClassLoader))))
What might be wrong?