Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Launch an external application in a shell
Launch an external application in a shell [message #532377] Sun, 09 May 2010 10:02 Go to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 7
Registered: May 2010
Junior Member
Hello everybody,
I think my problem is quite common but I cannot find any interesting answer on the Internet.

I have developped an eclipse RCP application, and I would like to launch an external application (it's a Java Swing app, but it could also be any win32 application) to display it inside an editor.

I know it's possible, because under the Eclipse IDE, when I click on an image to display it, it launches a "mspaint.exe" process and display it inside the editor (without the menu bar).
But I cannot found how to do it.

I've found a small article showing an SWT shell hosting a win32 application (winrar) and saying that it uses org.eclipse.swt.internal.win32.OS, but it does not say precisely how that was done, and moreover it's an internal and non portable API.

Any idea how to do this ?

Thank you for your answers.
Re: Launch an external application in a shell [message #532467 is a reply to message #532377] Mon, 10 May 2010 07:38 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
You should use 'Program' APIs of SWT framework for launching external
(may be default) application for any file associated with the platform.
For more info on the Program APIs, please refer to snippets (under
'Program' section) available at - http://eclipse.org/swt/snippets/
Re: Launch an external application in a shell [message #532485 is a reply to message #532467] Mon, 10 May 2010 08:52 Go to previous messageGo to next message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
Paint is opened inside editor or view by using OLE api..

I think that not be used for u r purpose since its your own swing application.....

Although there are SWT AWT bridges awailable where u can put swing components inside swt components,,,,
May be this can be used...


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Re: Launch an external application in a shell [message #532656 is a reply to message #532377] Mon, 10 May 2010 17:34 Go to previous messageGo to next message
Missing name Mising name is currently offline Missing name Mising nameFriend
Messages: 7
Registered: May 2010
Junior Member
Thank you for your answers.

What is the purpose of the "Program" API compared to the classical Java ProcessBuilder ?

I don't think I can use the SWT_AWT bridge, because I do not want to reuse components but launch a whole application (which could also be a native application), but I want it to be displayed inside a window of my RCP application.
Re: Launch an external application in a shell [message #532806 is a reply to message #532656] Tue, 11 May 2010 09:41 Go to previous messageGo to next message
Praveen  is currently offline Praveen Friend
Messages: 86
Registered: July 2009
Member
Zlika wrote:
> What is the purpose of the "Program" API compared to the classical Java
> ProcessBuilder ?
Program is a utility class that provides support to launch any kind of
application for any kind of file type. It provides transparency from the
user to launch the default application, or a custom application for any
file type.
I think ProcessBuilder is more for managing/creating/instantiating
processes itself, nothing to determine the application for a filetype,
determining the available apps/extensions installed on the machine.
Re: Launch an external application in a shell [message #533525 is a reply to message #532806] Fri, 14 May 2010 12:46 Go to previous message
Vijay RajFriend
Messages: 608
Registered: July 2009
Senior Member
Refer this post
http://www.eclipse.org/forums/index.php?t=msg&goto=51550 5&#msg_515505


---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
Previous Topic:Dotted line missing on focused Radio button and List
Next Topic:How can I make the WebBrowser to scroll up when new content is inserted
Goto Forum:
  


Current Time: Tue Apr 23 15:16:42 GMT 2024

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

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

Back to the top