Everytime I test using JUnit (in DrJava), it's working correctly, but after I get the test results, DrJava did a System.exit(-1) and I get this crazy exception in the console:
java org.junit.runner.JUnitCore tElements.TopElementsTest
JUnit version 4.4
...
Time: 0.063
OK (3 tests)
Unhandled exception: java.lang.NoClassDefFoundError: com/sun/jdi/VMOutOfMemoryException
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/sun/jdi/VMOutOfMemoryException
at edu.rice.cs.drjava.ui.DrJavaErrorHandler$1.run(DrJavaErrorHandler.java:109)
at java.awt.event.InvocationEvent.dispatch(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
My guess: The reason why I said the exception appeared because of the System.exit(-1) call was because I've made another class in another package. I specifically wrote System.exit(-1) in my codes and the exception appeared, but when I removed that line from my codes, the exception didn't appear.
So anyone know how to fix it for the JUnit test? (I didn't call System.exit(-1) for JUnit, so I don't know how to make that exception not appear.)