View RSS Feed

My Java Tips

Running code with compile errors

Rate this Entry
by , 05-24-2011 at 01:26 PM (1676 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.

Submit "Running code with compile errors" to Facebook Submit "Running code with compile errors" to Digg Submit "Running code with compile errors" to del.icio.us Submit "Running code with compile errors" to StumbleUpon Submit "Running code with compile errors" to Google

Tags: debug, debugger Add / Edit Tags
Categories
Eclipse

Comments