Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Start RCP Plugin without product(Start RCP Plugin without product)
Start RCP Plugin without product [message #540460] Wed, 16 June 2010 04:49 Go to next message
stuart donald is currently offline stuart donald
Messages: 12
Registered: June 2010
Junior Member
Hi

I would like to be able to start an RCP plugin as an application outside of the eclipse IDE, without creating a product. The reason I want to do this is that I would like to be able to control which plugins should be part of the RCP application by changing a configuration file.

To reproduce what I am trying to do, Create a new plugin project in eclipse
-Choosing "Create a new RCP Application"
-Choose "RCP Mail Template"

Now I can run this plugin from within the eclipse IDE by pressing the "Launch an Eclipse application" on the plugin.xml overview tab. I would like to be able to reproduce this beahviour from outside the IDE.

I tried doing something like this:

java -jar org.eclipse.osgi-3.5.1.R35x_v20090827.jar -clean -console -configuration conf -application my.example.Application

where conf is the directory where I put my config.ini (I used the config.ini generated by the run configuration when I pressed the "Launch Eclipse Application" above), and the -application parameter is my Application class name.

When running the above command all of the bundles install correctly, but the GUI never launches. What do I need to do to be able to correctly launch the GUI? Is this even possible, is eclipse doing some magic behind the scenes to make this work?
Re: Start RCP Plugin without product [message #540507 is a reply to message #540460] Wed, 16 June 2010 08:35 Go to previous messageGo to next message
Paul Webster is currently offline Paul Webster
Messages: 6859
Registered: July 2009
Location: Ottawa
Senior Member

Stu wrote:

> java -jar org.eclipse.osgi-3.5.1.R35x_v20090827.jar -clean -console
> -configuration conf -application my.example.Application

what if you use something like:

java -jar org.eclipse.equinox.launcher_1.1.0.v20100507.jar \
-clean -console -configuration conf \
-application my.example.Application

PW

--
Paul Webster
http://wiki.eclipse.org/Platform_Command_Framework
http://wiki.eclipse.org/Command_Core_Expressions
http://wiki.eclipse.org/Menu_Contributions
http://wiki.eclipse.org/Menus_Extension_Mapping
http://help.eclipse.org/galileo/index.jsp?topic=/org.eclipse .platform.doc.isv/guide/workbench.htm


Re: Start RCP Plugin without product [message #540662 is a reply to message #540507] Wed, 16 June 2010 17:43 Go to previous message
stuart donald is currently offline stuart donald
Messages: 12
Registered: June 2010
Junior Member
Thanks Paul, that worked perfectly.

Turns out that using org.eclipse.osgi-3.5.1.R35x_v20090827.jar also works, its just that I had an error in my application argument, and so the osgi console would launch but not the
GUI. I made the mistake of using the class name for the argument, when it should actually be the application node from plugin.xml:

<extension
id="product"
point="org.eclipse.core.runtime.products">
<product
application=" my.example.application"
...
Previous Topic:Should product configuration include fragments
Next Topic:TreeViewer with TableLayout
Goto Forum:
  


Current Time: Thu Jul 24 00:37:14 EDT 2014

Powered by FUDForum. Page generated in 0.02351 seconds