Fork me on GitHub
#clojure-uk
<
2017-01-22
>
rickmoynihan00:01:30

M-x cljr-add-project-dependency

ustunozgur14:01:37

@mattford The reason is you have to modify your classpath. The way lein works is, it generates the classpath, which is a collection of jar files (not directories), and then feeds it to java. Something like java -jar mylib1.jar:mylib2.jar:clojure.jar which you can see via lein classpath. There are tools to add new jars to the classpath after the system starts, which is what cljr-add-project-dependency does I believe.

practicalli-johnny14:01:43

@mattford If you add a dependency to a Clojure project you need to stop the REPL (assuming its running) and start the REPL again so that the library can be added by the JVM class loader. If you have clj-refactor, as mentioned, there is a hot loading option that will add your new dependency into your project without stopping & starting the REPL