hi everyone,

I was wondering does the eclipse ide support debugging. For example in netbeans if you have a bit of code you can go through it line by line and if you have an error say in line 5 the debugging stops at that point :lol:

thank you

Yes, it looks as though Eclipse does have debugging capability.

First you must toggle a breakpoint buy right clicking on the gray margin to the right of your code and selecting "toggle breakpoint".

Then right click your class in the navigating tab and select Debug and then Java Application. Eclipse will then switch to the debug perspective.

There might be a simpler way to do this, but this is how i figured it out.

hi ,

thanks for your help hooknc.....

One more question I am using eclipse 3.1.2 and in my code i have this line

import com.sun.java.swing.plaf.gtk.GTKLookAndFeel;

But it says: the import com.sun.java.swing.plaf.gtk cannot be resolved......Is there any solutions for this?

thank you

Which version of java are you working with?

What OS are you doing your development on?

From the small amount of research i could find, the GTKLookAndFeel was only available after the 1.4.2 release and it only seems as though the *unix versions of java were shipped with it.

[edit]
after further review, I was able to find the GTK source files on my XP machine. However, these are the source files and have to be compiled. Even then, they might not work correctly...

In your base java directory there should be a zip file or some compressed file called src. The gtk source files are located there.
[/edit]

You could use reflection (i.e. get the classes at run-time rather than at compile-time). This is safer because com.sun packages may exist on one OS distribution of Java and not another.

Anywho, why do you need to import those classes? If you'd like to use that look-and-feel theme, all you have to do this to include this line before creating any Swing objects:

try {
[INDENT]UIManager.setLookAndFeel("com.sun.java.swing.plaf.gtk.GTKLookAndFeel");[/INDENT]
}
catch (Exception e) {
[INDENT]// Print some message that the loading of the look-and-feel failed[/INDENT]
}

Hope this helps.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.