In my Eclipse Java project I have an exception occuring inside one of the
external JAR files that make up the project (apache commons-validator).
I've downloaded the commons-validator source and in the Eclipse IDE linked
the source path to the JAR file so that I can now see where the exception is
occuring inside this JAR.
However, I can't set breakpoints on this JAR source that actually work. The
IDE allows me to toggle the breakpoint entry on selected lines but the
breakpoint isn't used as when run the application skips past it.
Simply put, how can I temporarily include the source code of an external
library JAR into my project so that I can debug/trace problems using
breakpoints?
Diego Guidi - 05 Apr 2007 08:29 GMT
> In my Eclipse Java project I have an exception occuring inside one of the
> external JAR files that make up the project (apache commons-validator).
[quoted text clipped - 10 lines]
> library JAR into my project so that I can debug/trace problems using
> breakpoints?
Your operations are correct, and the breakpoint must work.
Maybe the source does not match the jar version? In this case what you
view is not what happen in the code
Oliver Wong - 05 Apr 2007 23:44 GMT
> In my Eclipse Java project I have an exception occuring inside one of
> the external JAR files that make up the project (apache
[quoted text clipped - 11 lines]
> library JAR into my project so that I can debug/trace problems using
> breakpoints?
In the way that you'd probably expect: Delete the jar, add the source
code files to your project, debug. When done, delete the source code
files, re-add the jar.
As Diego mentions, the problem is probably that your JAR and source
don't match up, but if the problem is with your code (e.g. passing in an
illegal parameter or something), hopefully the same exception will be
thrown despite the version difference.
- Oliver