Hi Asim,

In the clooj IDE, you can invoke the "Restart REPL" menu command and
your class will be reloaded. (Every time the REPL is "restarted," a
new classloader is created and the old one is discarded. Note that
restarting the REPL does not destroy your namespace mappings. It is
necessary to create a new chk instance. See example below.

Arthur

=== Switching to /projects/test3 REPL ===

(ns test3.core)
nil

test3.core=>
(import 'chk)
#<CompilerException java.lang.ClassNotFoundException: chk
(NO_SOURCE_FILE:1)>

[[Here I compiled chk.java in a child directory of my test3 project
directory.]]

test3.core=>
=== RESTARTING /projects/test3 REPL ===

(ns test3.core)

user=>nil

test3.core=>
(import 'chk)
chk

test3.core=>
(. (chk.) hello)
"Hello from chk (v1)."

[[Here I recompiled chk.java with v2.]]

test3.core=>
(. (chk.) hello)
"Hello from chk (v1)."

test3.core=>
=== RESTARTING /projects/test3 REPL ===

(ns test3.core)

user=>nil

test3.core=>
(. (chk.) hello)
"Hello from chk (v2)."

-- 
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 posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to