Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » How to launch an executable in a Plugin
How to launch an executable in a Plugin [message #184759] Sun, 17 December 2006 11:04 Go to next message
Eclipse UserFriend
Originally posted by: jonathan.orditz.selectron.ch

Hello,

I am writing a plugin for a tool I have written in C in the CDT
(myTool.exe).
The plugin has to work as following:
- Select a project and a configuration file in this project.
- Launch the executable on the selected project with a button in the menu
bar.
- See the output data of my executable in a View.

I encounter problems to launch my executable:
When I use "Process proc = Runtime.getRuntime.exec(Command for
myTool.exe)" the process is blocking the whole Eclipse framework.

Do someone have an example plugin demonstrating how it is possible to
launch an executable with a click on a button in the menu bar ?

Many thanks in advance,

Jonathan
Re: How to launch an executable in a Plugin [message #185091 is a reply to message #184759] Wed, 20 December 2006 11:00 Go to previous message
Guenther Koegel is currently offline Guenther KoegelFriend
Messages: 56
Registered: July 2009
Member
Dear Jonathan,

have a look at the Job API of Eclipse...

Basically you take two steps:

1) create a Job in your plug-in and schedule it
2) in your job you create your process
and optionally check for cancellation of your job
and destroy your process

Bye,

Günther

Jonathan schrieb:
> Hello,
>
> I am writing a plugin for a tool I have written in C in the CDT
> (myTool.exe).
> The plugin has to work as following:
> - Select a project and a configuration file in this project.
> - Launch the executable on the selected project with a button in the
> menu bar.
> - See the output data of my executable in a View.
>
> I encounter problems to launch my executable:
> When I use "Process proc = Runtime.getRuntime.exec(Command for
> myTool.exe)" the process is blocking the whole Eclipse framework.
>
> Do someone have an example plugin demonstrating how it is possible to
> launch an executable with a click on a button in the menu bar ?
>
> Many thanks in advance,
>
> Jonathan
>
Previous Topic:Breakpoint icon in the ruler of the Default Text editor
Next Topic:Howto: auto-revert-mode
Goto Forum:
  


Current Time: Thu Apr 25 14:46:11 GMT 2024

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

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

Back to the top