سؤال

We are using JRebel to quickly reload Java code changes into our JVM. This is working great!

But, we are also using Eclipse as IDE. And for some reason, Eclipse can really rebuild the whole project in my workspace, just because I add an annotation, I remove a method, or any other little code change ... Because of this rebuild phase, all classes are regenerated and are required to be reloaded by JRebel.

Is there any way to debug why Eclipse is always rebuilding our project for even a stupid little code change? I'm using Eclipse Indigo.

Thanks, Jochen

هل كانت مفيدة؟

المحلول 2

Disabling build automatically option does not break JRebel. JRebel depends on the results of the compilation, so if you disable the automatic build you will have to just compile the changed classes yourself, that's it.

You can try setting a VM argument -Drebel.check_class_hash=true which will check the checksum before reloading the classes. It may slow down the reloading time from a few milliseconds to some milliseconds extra. But it is still better than the situation when all the project classes have to be reloaded.

نصائح أخرى

You need to disable (or) uncheck Build Automatically.

Goto Project menu--->uncheck Build Automatically.

NOTE: This disables Automatic build. But as JesperE commented, it may impact the cause why you JRebel.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top