`add-classpath` works only in very limited circumstances. It breaks in most
environments that expect to control classloading through other means, like a
Java IDE or a servlet container.
-Stuart Sierra
clojure.com
--
You received this message because you are subscribed to the Google
Groups "Clo
Thanks Laurent and Isaac for pointers.
It would be interesting to know why clojure.core/add-classpath has
been deprecated in 1.1?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that p
On Thu, Mar 31, 2011 at 5:49 PM, Vitaly Peressada wrote:
> Wanted to add jar to classpath without restarting REPL. Recalled java
> reflection hack. Ported to Clojure.
>
Have a look at http://icylisper.in/jark/classpath.html
Jark is a tool to manage classpaths and clojure namespaces on a persistent
There is this which is in Clojure, but is considered deprecated :
clojure.core/add-classpath
2011/3/31 Vitaly Peressada
> Wanted to add jar to classpath without restarting REPL. Recalled java
> reflection hack. Ported to Clojure.
>
> user=> (import (org.apache.commons.cli Parser))
> ; fails with
One alternative to this would be to start a Nailgun server. You can
add to the classpath quite easily.
That said, this looks pretty interesting.
Ambrose
On Thu, Mar 31, 2011 at 8:19 PM, Vitaly Peressada wrote:
> Wanted to add jar to classpath without restarting REPL. Recalled java
> reflection
Wanted to add jar to classpath without restarting REPL. Recalled java
reflection hack. Ported to Clojure.
user=> (import (org.apache.commons.cli Parser))
; fails with "#
(import (java.io File)
(java.net URL URLClassLoader)
(java.lang.reflect Method))
(defn add-to-cp [#^String jarpath]
(let