Runtime.exec() in Action Delegate [message #20546] |
Mon, 28 April 2003 16:45  |
Eclipse User |
|
|
|
Originally posted by: hawkini.myrealbox.com
I'm trying to execute a .bat file and a .exe file within a popupMenu action
class,
but since I'm on XP, and since eclipse uses javaw, a command window (DOS
prompt)
appears during the execution.
I've tried cmd /c start /b and various combinations to get them to
dissappear,
I've tried redirecting output from the System to elsewhere etc, but to no
avail.
Since I can't change the way eclipse loads, is there some kind of way inside
eclipse
to call programs outside the runtime? Or do I still have to go the System
runtime route?
Regards,
Matt Hawkins
|
|
|
Re: Runtime.exec() in Action Delegate [message #27289 is a reply to message #20546] |
Fri, 02 May 2003 00:08  |
Eclipse User |
|
|
|
Originally posted by: ed.burnette.REMOVE.THIS.sas.com
I've had good luck with this code:
Process p = DebugPlugin.exec(cmdLine, null);
(and no extra windows pop up for me). You might want to check out launchers,
for example look up ILaunchConfigurationDelegate and
AbstractLaunchConfigurationTabGroup. Using a launcher would give you access
to the console window if you want it. Inside a launcher you'd followup the
exec() call with:
if (p != null) {
IProcess newProcess =
DebugPlugin.newProcess(
launch,
p,
renderCommandLine(cmdLine),
processAttributes);
launch.addProcess(sasProcess);
}
--
Ed Burnette, co-author Eclipse in Action (www.manning.com/gallardo)
"Matt Hawkins" <hawkini@myrealbox.com> wrote in message
news:b8k3tm$kfg$1@rogue.oti.com...
> I'm trying to execute a .bat file and a .exe file within a popupMenu
action
> class,
> but since I'm on XP, and since eclipse uses javaw, a command window (DOS
> prompt)
> appears during the execution.
>
> I've tried cmd /c start /b and various combinations to get them to
> dissappear,
> I've tried redirecting output from the System to elsewhere etc, but to no
> avail.
>
> Since I can't change the way eclipse loads, is there some kind of way
inside
> eclipse
> to call programs outside the runtime? Or do I still have to go the System
> runtime route?
>
> Regards,
>
> Matt Hawkins
>
>
|
|
|
Powered by
FUDForum. Page generated in 0.02961 seconds