Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » debug confused
debug confused [message #1751173] Thu, 05 January 2017 11:00 Go to next message
Bianca Bromonti is currently offline Bianca BromontiFriend
Messages: 5
Registered: January 2017
Junior Member
I have created a new class, I would like to debug it, but it debugs the previous class I have debugged.
Re: debug confused [message #1751201 is a reply to message #1751173] Thu, 05 January 2017 15:30 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31230
Registered: July 2009
Senior Member
Debugging creates a launcher, you can have multiple of them. Look at the drop-down next to the debug toolbar button; that will tell you wan it is you're launching. You can also right click on a class to bring up the context menu and from there.
Re: debug confused [message #1751205 is a reply to message #1751173] Thu, 05 January 2017 16:01 Go to previous messageGo to next message
Nitin Dahyabhai is currently offline Nitin DahyabhaiFriend
Messages: 3749
Registered: July 2009
Senior Member

Do the old and new classes have similarities, like the exact same name? Are they in different projects?

Nitin Dahyabhai
Eclipse Web Tools Platform
Re: debug confused [message #1751669 is a reply to message #1751201] Thu, 12 January 2017 11:28 Go to previous messageGo to next message
Bianca Bromonti is currently offline Bianca BromontiFriend
Messages: 5
Registered: January 2017
Junior Member
I wrote this small class in a different version of eclipse (indigo) and I could debug it without problems.
I have imported the project into a new eclipse (mars.2) and I can debug every other classes except this.
In the debug configurations this class doesn't appear in the main class list.
Re: debug confused [message #1751670 is a reply to message #1751205] Thu, 12 January 2017 11:30 Go to previous messageGo to next message
Bianca Bromonti is currently offline Bianca BromontiFriend
Messages: 5
Registered: January 2017
Junior Member
They are in the same project with different names.
Re: debug confused [message #1751673 is a reply to message #1751670] Thu, 12 January 2017 11:52 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31230
Registered: July 2009
Senior Member
Does the class have a "public static void main(String[] args)" method? Don't expect us to be psychic...
Re: debug confused [message #1751698 is a reply to message #1751673] Thu, 12 January 2017 16:05 Go to previous messageGo to next message
Bianca Bromonti is currently offline Bianca BromontiFriend
Messages: 5
Registered: January 2017
Junior Member
Yes, it has.
Re: debug confused [message #1751700 is a reply to message #1751698] Thu, 12 January 2017 16:22 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 31230
Registered: July 2009
Senior Member
As I mentioned, we're not psychic. We know nothing of your file structure or the contents of the file, but we should guess what might be wrong, with the minimal input from you.

In a *.java file that's on the project's classpath and with a proper main method, the context menu's Run As/Debug As submenu will include Java Application. Is that present? If you invoke it, you say it runs/debugs something else?

Note that a response from you that provides no additional elaboration of the details will not prompt another response from me.
Re: debug confused [message #1751705 is a reply to message #1751700] Thu, 12 January 2017 16:57 Go to previous messageGo to next message
Bianca Bromonti is currently offline Bianca BromontiFriend
Messages: 5
Registered: January 2017
Junior Member
The structure is very simple, and the Run As/Debug As submenu doesn't include this Java Application.

..imports...

public class TraspasoSAP
{
..variables....

public void TraspasoSAP(){};

public static void conectarBBDD() throws UnknownHostException{}

public static void traspasar(int p_productid) throws JCoException, SQLException, AddressException, MessagingException {}


public static void main(int args) throws JCoException, SQLException, UnknownHostException, AddressException, MessagingException
{

TraspasoSAP traspaso = new TraspasoSAP();
conectarBBDD();
traspasar(args);

}
}
Re: debug confused [message #1751777 is a reply to message #1751705] Fri, 13 January 2017 17:57 Go to previous message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
You have the incorrect signature for the main method; it needs to accept String[] as the argument type. Like this:
public static void main(String[] args) {
Previous Topic:Empty "Project Selection"
Next Topic:Where To Start?
Goto Forum:
  


Current Time: Sat Jul 04 18:01:43 GMT 2020

Powered by FUDForum. Page generated in 0.03590 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top