Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Debug in Eclipse - ClassNotFoundException

when i debug in Eclipse a simple console application, I get a lot of ClassNotFoundException lines in the debug Window. It is not an error, somewhat lower in another pane I get "Source not found.". I understand that it is because the source code of the required class is not available, buI would like to skip over these lines... I have to press a lot of times the "step over" or "step out" button to get out of these states.

What can I do in order to avoid these useless lines at all?

Thanks

like image 538
lmsasu Avatar asked Dec 24 '10 09:12

lmsasu


People also ask

How do I fix Classnotfoundexception in Eclipse?

click on project->properties->Java build path->Source and check each src folder is still valid exist or recently removed. Correct any missing path or incorrect path and rebuild and run the test. It will fix the problem.

How do I enable debugging in Eclipse?

A Java program can be debugged simply by right clicking on the Java editor class file from Package explorer. Select Debug As → Java Application or use the shortcut Alt + Shift + D, J instead.

How do I set debug level in Eclipse?

In the Eclipse settings under General->Error Reporting there is the option "Enable debug mode".


2 Answers

I've been having this problem for a few months now. I'd be debugging a java app and every time I'd hit a constructor, eclipse would try to find matching java core library ClassNotFoundException's source code.

I solved this problem by right-clicking in Debug window on the ClassNotFoundException when I hit it, and clicking on Filter Type. I would then right-click in the debug window again and choose Edit Step Filters.... In the Edit Step Filters window I checked everything in the Defined Step Filters section and unchecked everything in the bottom of the window (Filter synthetic methods, Filter static initializers, etc).

Hope this helps others in the future.

like image 121
TimeTrap Avatar answered Oct 02 '22 14:10

TimeTrap


After Launching Debug Mode.

Go to Window → Show View → Break Points. Now you would be able to see Break Point tab in Debugging mode.

Uncheck the option "ClassNotFoundException: caught and uncaught".

like image 37
numbers3567 Avatar answered Oct 02 '22 14:10

numbers3567