Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Launching external executable?
Launching external executable? [message #332118] Mon, 06 October 2008 07:34 Go to next message
J. Rietz is currently offline J. RietzFriend
Messages: 40
Registered: July 2009
Member
Hi,

For a certain scenario I need to launch an external executable (*.exe)
from within an RCP application.
I also need to have control of the launched process, e.g. get return
status etc.

Which is the most suiteable and recommended approach for this?
I've searched a lot about launching and basically all I've found deals
with Eclipse launch framework (i.e. creating ILaunchConfigurationType,
ILaunchConfiguration...).
But isn't this approach more applicable for run/debug activities during
development?
Or if needed to provide run/debug launch configuration UI to user?
Because this is not the case for me. I just need to launch an executable
and have proper control for that launched process.

BTW. I'm running on Windows platform.


Thanks in advance, need a quick answer!

Regards,
Joachim
Re: Launching external executable? [message #332121 is a reply to message #332118] Mon, 06 October 2008 10:02 Go to previous messageGo to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Joachim Rietz wrote:
> Hi,
>
> For a certain scenario I need to launch an external executable (*.exe)
> from within an RCP application.
> I also need to have control of the launched process, e.g. get return
> status etc.
>
> Which is the most suiteable and recommended approach for this?
> I've searched a lot about launching and basically all I've found deals
> with Eclipse launch framework (i.e. creating ILaunchConfigurationType,
> ILaunchConfiguration...).
> But isn't this approach more applicable for run/debug activities during
> development?
> Or if needed to provide run/debug launch configuration UI to user?
> Because this is not the case for me. I just need to launch an executable
> and have proper control for that launched process.
>
> BTW. I'm running on Windows platform.

I would have tried Runtime#exec. The return type is a Process object,
which has e.g. a method waitFor and a method exitValue....

HTH,

Daniel Krügler
Re: Launching external executable? [message #333123 is a reply to message #332121] Wed, 26 November 2008 10:41 Go to previous message
Eclipse UserFriend
Originally posted by: luimarr1.upvnet.upv.es

Daniel Krügler escribió:
> Joachim Rietz wrote:
>> Hi,
>>
>> For a certain scenario I need to launch an external executable (*.exe)
>> from within an RCP application.
>> I also need to have control of the launched process, e.g. get return
>> status etc.
>>
>> Which is the most suiteable and recommended approach for this?
>> I've searched a lot about launching and basically all I've found deals
>> with Eclipse launch framework (i.e. creating ILaunchConfigurationType,
>> ILaunchConfiguration...).
>> But isn't this approach more applicable for run/debug activities
>> during development?
>> Or if needed to provide run/debug launch configuration UI to user?
>> Because this is not the case for me. I just need to launch an
>> executable and have proper control for that launched process.
>>
>> BTW. I'm running on Windows platform.
>
> I would have tried Runtime#exec. The return type is a Process object,
> which has e.g. a method waitFor and a method exitValue....
>
> HTH,
>
> Daniel Krügler
Hi Daniel,

i did it not long ago and found some trouble that finally solved
reading this article:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps. html?page=3

regards,
Luis
Previous Topic:DB-plugin with visualisation?
Next Topic:Syntax Highlighting Rules for Custom Editor
Goto Forum:
  


Current Time: Sat Jul 27 13:22:10 GMT 2024

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

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

Back to the top