Launching configurations bug [message #87153] |
Wed, 20 August 2003 09:34  |
Eclipse User |
|
|
|
Originally posted by: sddg.yahoo.com
Here is a code snippet for launching a configuration in a DEBUG mode:
ILaunchConfigurationWorkingCopy wc= null;
ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
ILaunchConfigurationType type=
manager.getLaunchConfigurationType("whatever");
wc= type.newInstance(null, dial.getLaunchInfo());
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_ TYPE_NAME,
"VOID");
wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_AR GUMENTS, "-jar
lib/oscar.jar");
wc.setAttribute(
IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
installdir.getAbsolutePath());
ILaunchConfiguration c= wc.doSave();
c.launch(
ILaunchManager.DEBUG_MODE ,
null);
The VM starts but the debugger cannot connect because the launch line is
actually:
D:\JavaVM\jdk_1_4_2\bin\javaw.exe -jar
lib\oscar.jar -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_
socket,suspend=y,address=localhost:11487 VOID
the problem is that "-jar lib\oscar.jar" must be AFTER the DEBUG settings
but there is absolutely no way for me to change the order :((
|
|
|
Re: Launching configurations bug [message #89291 is a reply to message #87153] |
Tue, 26 August 2003 14:28   |
Eclipse User |
|
|
|
Are you actually specifying a VM argument, or a program argument? Program
arguments come after the main type name, and are specified with
ATTR_PROGRAM_ARGUMENTS.
Darin
"Sui Ma" <sddg@yahoo.com> wrote in message news:bhvtbv$kki$1@eclipse.org...
> Here is a code snippet for launching a configuration in a DEBUG mode:
>
> ILaunchConfigurationWorkingCopy wc= null;
>
> ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
>
> ILaunchConfigurationType type=
> manager.getLaunchConfigurationType("whatever");
>
> wc= type.newInstance(null, dial.getLaunchInfo());
>
> wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_ TYPE_NAME,
> "VOID");
>
>
> wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_AR GUMENTS, "-jar
> lib/oscar.jar");
>
> wc.setAttribute(
>
> IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
>
> installdir.getAbsolutePath());
>
> ILaunchConfiguration c= wc.doSave();
>
> c.launch(
>
> ILaunchManager.DEBUG_MODE ,
>
> null);
>
>
>
>
>
>
>
>
>
> The VM starts but the debugger cannot connect because the launch line is
> actually:
>
> D:\JavaVM\jdk_1_4_2\bin\javaw.exe -jar
>
lib\oscar.jar -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_
> socket,suspend=y,address=localhost:11487 VOID
>
>
>
> the problem is that "-jar lib\oscar.jar" must be AFTER the DEBUG settings
> but there is absolutely no way for me to change the order :((
>
>
>
>
>
>
>
>
|
|
|
Re: Launching configurations bug [message #91507 is a reply to message #89291] |
Tue, 02 September 2003 09:03  |
Eclipse User |
|
|
|
Originally posted by: sddg.yahoo.com
u r right, '-jar lib/oscar.jar' must be set as a ATTR_PROGRAM_ARGUMENTS to
appear last
"Darin Wright" <Darin_Wright@ca.ibm.com> wrote in message
news:big5a1$iq6$1@eclipse.org...
> Are you actually specifying a VM argument, or a program argument? Program
> arguments come after the main type name, and are specified with
> ATTR_PROGRAM_ARGUMENTS.
>
> Darin
>
> "Sui Ma" <sddg@yahoo.com> wrote in message
news:bhvtbv$kki$1@eclipse.org...
> > Here is a code snippet for launching a configuration in a DEBUG mode:
> >
> > ILaunchConfigurationWorkingCopy wc= null;
> >
> > ILaunchManager manager= DebugPlugin.getDefault().getLaunchManager();
> >
> > ILaunchConfigurationType type=
> > manager.getLaunchConfigurationType("whatever");
> >
> > wc= type.newInstance(null, dial.getLaunchInfo());
> >
> > wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_MAIN_ TYPE_NAME,
> > "VOID");
> >
> >
> > wc.setAttribute(IJavaLaunchConfigurationConstants.ATTR_VM_AR GUMENTS,
"-jar
> > lib/oscar.jar");
> >
> > wc.setAttribute(
> >
> > IJavaLaunchConfigurationConstants.ATTR_WORKING_DIRECTORY,
> >
> > installdir.getAbsolutePath());
> >
> > ILaunchConfiguration c= wc.doSave();
> >
> > c.launch(
> >
> > ILaunchManager.DEBUG_MODE ,
> >
> > null);
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > The VM starts but the debugger cannot connect because the launch line is
> > actually:
> >
> > D:\JavaVM\jdk_1_4_2\bin\javaw.exe -jar
> >
>
lib\oscar.jar -Xdebug -Xnoagent -Djava.compiler=NONE -Xrunjdwp:transport=dt_
> > socket,suspend=y,address=localhost:11487 VOID
> >
> >
> >
> > the problem is that "-jar lib\oscar.jar" must be AFTER the DEBUG
settings
> > but there is absolutely no way for me to change the order :((
> >
> >
> >
> >
> >
> >
> >
> >
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.11359 seconds