Running code with compile errors
by, 05-24-2011 at 01:26 PM (2127 Views)
While coding in Java using Eclipse, you might have experienced situations where your Java class has some compile errors but stilly you want to run it. The reason might be that the problematic area might be invoked in your execution. What ever is the reason, Ill briefly explain how to execute code with compile errors.
In Eclipse, you can run and debug code that did not compile cleanly. You cannot do this using command prompt. If line of code with compile error is executed, following can happen:
If you are debugging and you have set: 'Suspend execution on compilation errors' preference on the Java > Debug preference page then the debug session will suspend as if a breakpoint had been hit. If your VM supports Hot Code Replace, you could then fix the compilation error and resume debugging.
In normal case, execution will terminate with a 'unresolved compilation' error.