Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » NullPointerException when trying to get debug plug-in instance(DebugPlugin.getDefault().getLaunchManager() gives NullPointerExcetion because the default debug plugin is null)
NullPointerException when trying to get debug plug-in instance [message #530160] Wed, 28 April 2010 17:11
Tomas  is currently offline Tomas Friend
Messages: 1
Registered: April 2010
Junior Member
Hi all,

I am trying to run a configuration programmatically, and came across the article "Launching Java Applications Programmatically" at http://www.eclipse.org/articles/Article-Java-launch/launchin g-java.html. Basically what I want to do it to run a GUI (standard Java application) that will run an Eclipse configuration (created using the "Run Configurations" dialogue) when a button is pressed.

The first step to run the configuration is to retrieve it. I have tried to use DebugPlugin.getDefault().getLaunchManager() so I can get all the configurations of my type and then find the configuration in which I'm interested using its name (as suggested by the previous article). The problem is that DebugPlugin.getDefault() returns a NullPointerException because the fgDebugPlugin variable seems to stay as null.

I have been trying to find a solution but so far I didn't find anybody with this same problem. Maybe I am doing all wrong and this is not the way to run a configuration the way I intend? Maybe I need to do something first to create the debug plug-in instance?

Any help will be very much appreciated.

Best regards,
Tomas
Previous Topic:Image gets slightly erased on SWT/Windows
Next Topic:Re: Drag and Drop plug in installation
Goto Forum:
  


Current Time: Thu Dec 18 23:09:51 GMT 2014

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

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