Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Runtime.exec() in Action Delegate
Runtime.exec() in Action Delegate [message #20546] Mon, 28 April 2003 16:45 Go to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
>
>
Previous Topic:EJB dev
Next Topic:Capture SHIFT key down in Editor
Goto Forum:
  


Current Time: Sun Apr 27 10:28:40 EDT 2025

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

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

Back to the top