There's a good chance that JavaRebel would let you do what you want:

        http://www.zeroturnaround.com/jrebel/


Rob.


On 27 Aug 2011, at 15:41, Asim Jalis wrote:

> Is there a way to reimport a Java class into the REPL?
> 
> This would be very useful in dynamically developing Java code from the REPL.
> 
> Here is a specific example.
> 
> Create a java class:
> 
> cat << 'END_OF_FILE' > chk.java
> public class chk {
>  public String hello() {
>    return "Hello from chk (v1).";
>  }
> }
> END_OF_FILE
> javac chk.java
> 
> Start Clojure:
> 
> user=> (import 'chk)
> chk
> user=> (.. (chk.) hello)
> "Hello from chk (v1)."
> user=> ; Now modify chk.java and change v1 to v2.
> user=> (.. (chk.) hello)
> "Hello from chk (v1)."
> user=> (import 'chk)
> chk
> user=> (.. (chk.) hello)
> "Hello from chk (v1)."
> 
> Is there a way to make Clojure load the new chk.class?
> 
> -- 
> 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

-- 
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