In general, no -- in a typical project setup, any changes to Java code  
precipitate a rebuild and a restart of your application.

There are plenty of ways to avoid this, but currently, they're only  
used in the major IDEs when debugging (e.g. while debugging an  
application, you can usually make various changes to java code, and  
then load those changes into the running application without  
restarting).  This is accomplished by bootstrapping the application  
with a custom classloader (or, more likely, many, many classloaders)  
that allows the IDE to replace bytecode at various levels of  
granularity (class, method, etc).  In my experience, eclipse is much  
better at this than netbeans, although the latter should approach  
parity with the 6.7 release if I've read the tea leaves properly.

I know of people who have used JavaRebel 
(http://www.zeroturnaround.com/javarebel/ 
) to implement this kind of hot code reloading in a production  
environment; apparently, it works quite well.  You could try using it  
yourself -- it appears to be free for personal and open-source  
development.  How it will interact with clojure and the details of its  
classloader-related implementation is anyone's guess.

- Chas

On Mar 10, 2009, at 2:01 AM, Javier wrote:

>
> Hello, I'd like to thank you for providing us Clojure. This is  
> fantastic.
>
> My background in Lisp if for several years now, just for fun, and  
> using
> Common Lisp, mainly.
> I have some programs in Java, and would like to use Clojure to
> test/develop them. My question is:
>
> Is it easy to test/load Java code in real time in Clojure while
> developing it? For example, I have a bunch of classes I want to  
> continue
> developing in Java, while other parts are made in Clojure. Is it
> possible to test my modifications of the Java part in Clojure in  
> real time?
>
> I'm using Netbeans.
>
>
> >


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