BeansWrapper.isJavaRebelAvailable() causes eclipse to suspend in debug mode
Generates text that depends on changing data (like dynamic HTML).
Brought to you by:
revusky
```
private static boolean isJavaRebelAvailable() {
try {
JavaRebelIntegration.testAvailability();
return true;
}
catch(NoClassDefFoundError e) {
return false;
}
}
```
Loading JavaRebelIntegration throws a ClassNotFoundException (default classloader), which Eclipse (Kepler) by default suspends on. This makes working with freemarker very annoying.
Well, disable suspension on that exception... A lot of other libraries detect availability of other classes like this, and I believe there's no better way of doing that. Or is there?
(BTW, I used to debug FreeMarker sometimes, but for me Eclipse doesn't suspend on it.)
"closed invalid"? I am experiencing this issue as well.
I think you also need to catch "ClassNotFoundException" to overcome this problem.
http://stackoverflow.com/questions/1457863/what-is-the-difference-between-noclassdeffounderror-and-classnotfoundexception
Last edit: deadlycheese 2014-06-26
For anyone else experiencing this problem, here is a simple workaround:
Then, you can call the method and swallow the ClassNotFoundException:
It only meant to throw
NoClassDefFoundError, notClassNotFoundException. Does it throwClassNotFoundExceptionfor you? Can you paste the stack trace?OK, my bad. JRebel was still in my classpath. Without that Eclipse debug has suspended execution for me too, and so I could find a way with which it doesn't do that.