Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » running an external process
running an external process [message #324208] Sun, 20 January 2008 04:59 Go to next message
Eclipse UserFriend
Hi

I hope this is the right newsgroup to ask this question;

I need to run an external program from an eclipse plugin I'm working on.
Can I use the standard Java API (Process, etc.) or are there any
specific API from eclipse?

Thanks in advance
Lorenzo

P.S. of course any link to examples on line are welcome :-)

--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: running an external process [message #324213 is a reply to message #324208] Sun, 20 January 2008 11:35 Go to previous messageGo to next message
Eclipse UserFriend
You can try org.eclipse.swt.program.Program

Snjeza

Lorenzo Bettini wrote:
> Hi
>
> I hope this is the right newsgroup to ask this question;
>
> I need to run an external program from an eclipse plugin I'm working on.
> Can I use the standard Java API (Process, etc.) or are there any
> specific API from eclipse?
>
> Thanks in advance
> Lorenzo
>
> P.S. of course any link to examples on line are welcome :-)
>
> --
> Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
> ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
> HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
> http://www.myspace.com/supertrouperabba
> BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
> http://www.gnu.org/software/src-highlite
> http://www.gnu.org/software/gengetopt
> http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Re: running an external process [message #324239 is a reply to message #324213] Mon, 21 January 2008 07:42 Go to previous messageGo to next message
Eclipse UserFriend
I had already seen that one, but the documentation says:

"Instances of this class represent programs and their associated file
extensions in the operating system."

so it's only for that specific context...

Snjezana Peco wrote:
> You can try org.eclipse.swt.program.Program
>
> Snjeza
>
> Lorenzo Bettini wrote:
>> Hi
>>
>> I hope this is the right newsgroup to ask this question;
>>
>> I need to run an external program from an eclipse plugin I'm working on.
>> Can I use the standard Java API (Process, etc.) or are there any
>> specific API from eclipse?
>>
>> Thanks in advance
>> Lorenzo
>>
>> P.S. of course any link to examples on line are welcome :-)
Re: running an external process [message #324268 is a reply to message #324239] Mon, 21 January 2008 15:33 Go to previous messageGo to next message
Eclipse UserFriend
You can execute some program using Program.launch() or Program.execute()

Snjeza

Lorenzo Bettini wrote:
> I had already seen that one, but the documentation says:
>
> "Instances of this class represent programs and their associated file
> extensions in the operating system."
>
> so it's only for that specific context...
>
> Snjezana Peco wrote:
>> You can try org.eclipse.swt.program.Program
>>
>> Snjeza
>>
>> Lorenzo Bettini wrote:
>>> Hi
>>>
>>> I hope this is the right newsgroup to ask this question;
>>>
>>> I need to run an external program from an eclipse plugin I'm working on.
>>> Can I use the standard Java API (Process, etc.) or are there any
>>> specific API from eclipse?
>>>
>>> Thanks in advance
>>> Lorenzo
>>>
>>> P.S. of course any link to examples on line are welcome :-)
>
Re: running an external process [message #324282 is a reply to message #324268] Tue, 22 January 2008 03:01 Go to previous message
Eclipse UserFriend
Snjezana Peco wrote:
> You can execute some program using Program.launch() or Program.execute()
>
> Snjeza
>
> Lorenzo Bettini wrote:
>> I had already seen that one, but the documentation says:
>>

but you need to pass the file extension
( http://download.eclipse.org/eclipse/downloads/documentation/ 2.0/html/plugins/org.eclipse.platform.doc.isv/reference/api/ org/eclipse/swt/program/Program.html)

execute

public boolean execute(String fileName)

Executes the program with the file as the single argument in the
operating system. It is the responsibility of the programmer to ensure
that the file contains valid data for this program.



--
Lorenzo Bettini, PhD in Computer Science, DI, Univ. Torino
ICQ# lbetto, 16080134 (GNU/Linux User # 158233)
HOME: http://www.lorenzobettini.it MUSIC: http://www.purplesucker.com
http://www.myspace.com/supertrouperabba
BLOGS: http://tronprog.blogspot.com http://longlivemusic.blogspot.com
http://www.gnu.org/software/src-highlite
http://www.gnu.org/software/gengetopt
http://www.gnu.org/software/gengen http://doublecpp.sourceforge.net
Previous Topic:Configuring builders for a project
Next Topic:ITableFontProvider and System fonts
Goto Forum:
  


Current Time: Thu Jul 17 19:59:16 EDT 2025

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

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

Back to the top