开发者

Cascading runtime errors in Java Swing

I'm currently integrating some new classes into an existing application. I have a JDialog which, when clicked, throws a number of runtime exceptions.

I'm new to Java debugging - why would all of these Swing/AWT library functions be 'unavailable'?

SO forbids me from posting images, so here's a lin开发者_Go百科k to a capture of the eclipse debugger:

http://i.imgur.com/jDWEe.png

Why would these methods be unavailable?


Those classes are available, they have been compiled without line numbers so the eclipse debugger is just telling you that it doesn't know which line of JButton from the original source etc. it is currently on. See the various javac -g options. Line number information will not be terribly helpful in debugging, but within your own code this will help track down causes of stack traces and of course helps the debugger know where it is up to.


The "not available" indicates that the classes were compiled without debug information, i.e. using the -g:none switch with javac. Since those are Standard API classes, I suspect that your eclipse project is configured to use the JRE System Library from a JRE installation rather than a JDK. You can change that in the project properties (right click on project -> Properties -> Java Build Path -> Libraries); you may have to install a JDK first.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜