I have a run configuration defined for my Eclipse RCP application which is saved to a .launch file. Is there a way to use this launch configuration outside the Eclipse IDE? i.e, it would be nice to be able to launch the application from the command line for continuous integration purposes.
3 Answers
You can get the command line Eclipse uses:
- Run your program in Eclipse
- Go to the "Debug" view
- Right-click on the process (probably the second item in the tree) and select "Properties"
- Copy shell command and delete the agentlib flag to run in bash. Unfortunately, you need to do this whenever you change the configuration.

- 13,613
- 4
- 67
- 57
-
2I don't think this answers the question at all. He asked if the launch configuration can be launched via command line i.e. in a batch file. – Jiří Kantor Aug 10 '15 at 08:05
-
You can get the command line used by Eclipse to launch the application with these steps. There is still the problem of having to update your script whenever your configuration changes, but it works. – Peter Tseng Aug 10 '15 at 23:34
-
Sorry my bad, I understood your answer incorrectly. – Jiří Kantor Aug 11 '15 at 08:46
Yes, you could create and export a product configuration based on your launch-configuration:
- Create new Product Configuration (File -> New -> Other)
- Name the file (e.g. myrcp.product)
- Select "Use a launch configuration" on the first page of the wizard
The product editor should open automatically. In the Exporting section you should be able to export your product using the "Eclipse Product export wizard".
Resource: Eclipse FAQ - How can I deploy my RCP app
Have a look at this PDE Build tutorial. It explains how to build and test (or run) your product using Ant.

- 598
- 3
- 9
-
I was asking about how to run a launch configuration outside of Eclipse, i.e. headless environment. Note that creating a product configuration based on a launch configuration only works for launch configurations for 'Eclipse applications'. – lucks Apr 26 '11 at 23:08
-
1@lucks I don't think I understood you correctly. you wrote "I have a run configuration defined for my Eclipse RCP application". However, if you are searching for a way to call your launch configuration programmatically, then this question might be a duplicate of [How to run Eclipse launch configurations programmatically?](http://stackoverflow.com/questions/222093/how-to-run-eclipse-launch-configurations-programmatically) – eldn Apr 27 '11 at 11:28
It is possible to do that with a little workaround. You can find your configuration at workspace\.metadata\.plugins\org.eclipse.debug.core\.launches
.
So, open it in text editor and find an attribute containing goals, e.g. clean install -DskipTests=true
.
Then, go to the root of your project and execute that by the CMD
:
mvn clean install -DskipTests=true
This should be similar for other goals.

- 3,797
- 3
- 41
- 39