Search code examples
emacsclojureclasspathslime

emacs slime-connect version of clojure doesn't lookup the $CLASSPATH


I need to use my clojure functions with slime-connect. And I put all my libs in the $CLASSPATH.

As I learned from this question. I used the following command to check the CLASSPATH for current environment, and I found none of my $CLASSPATH is used.

How can I attach my class path for my clojure with emacs/slime-connect? I installed my emacs/leinigen as asked and answered here.

(doseq [p (.getURLs (java.lang.ClassLoader/getSystemClassLoader))] (println (.getPath p)))
/Users/smcho/bin/leiningen/src/
/Users/smcho/bin/leiningen/test/
/Users/smcho/bin/leiningen/classes/
...
/Users/smcho/bin/leiningen/lib/dev/swank-clojure-1.2.1.jar

Solution

  • lein provides that libraries, that are specified in its dependencies. So, it's better to specify all needed libraries in project.clj, and re-run lein swank command