Question

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 link to a capture of the eclipse debugger:

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

Why would these methods be unavailable?

Was it helpful?

Solution

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.

OTHER TIPS

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.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top