Launching external executable? [message #332118] |
Mon, 06 October 2008 07:34  |
Eclipse User |
|
|
|
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   |
Eclipse User |
|
|
|
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  |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.04348 seconds