Copyright © 2007, 2008, 2009, 2010, 2011, 2012, 2013 Lars Vogel
|Revision 0.1 - 0.7||14.08.2007 - 03.09.2007||Lars
|Revision 0.8 - 7.2||03.11.2008 - 20.02.2013||Lars
|Several bug fixes and enhancements|
Table of Contents
A product configuration file, or in shorter form a product, defines the configuration of your Eclipse application, e.g. icons, splash screen and which plug-ins or features are included in your application.
The product is a development artifact which describes the content of your application and is not required at runtime.
always points to one
class must implement the
interface and for Eclipse 4 RCP applications it should point to the
You define your product configuration via a
product configuration file can be created via a right-click on
project and by selecting
On the Overview tab of your product you can start the product.
link writes the relevant
information into the
It is possible to enter an ID for the product. Avoid using the same ID for the product as for a plug-in as this might create problems during a product export. Convention is to add the .product extension to the ID.
A product can either be based on plug-ins or on features. This setting is done on the Overview tab of the product configuration file.
On the Dependency tab you maintain the plug-ins or features your products consists of. A product does not perform automatic dependency resolution. If you add a feature to your product and want to add its dependencies, press the Add Required button.
tab allows you to specify the plug-in which
contains the splash
need to put the
into the project main
The name and location of the
Eclipse, but the path can be
changed via the
parameter, the file name can be changed with the
-showsplash path_to_file. See
to learn how to set launch parameters.
You can configure the launcher name and icon for your
product. The launcher is the executable program that is
the deployment of the product. A launcher is
platform specific. For
Windows platform. This
launcher has also
icon associated with
change the name and the
Here you can specify the file name of the launcher and the icon which should be used. Make sure the format of the icons is correct, otherwise Eclipse will not use them.
The icon configuration depends on the platform you are using. Eclipse allows you to export your application for multiple platforms and uses the correct ones based on your product configuration.
In the Launching Arguments section you can specify parameters for your Eclipse application and arguments for the Java runtime environment. Program Arguments are parameters passed to the Eclipse application.
The relevant sections are highlighted in the following screenshot.
Your product configuration file can be used to export your application to run outside of Eclipse.
Exporting your product creates a folder with all required artifacts to run your application. This includes a native launcher specific to the platforms, e.g. Windows or Linux, you have exported it for.
To export the product switch to your product configuration file,
tab and click on the
Eclipse Product export wizard
In the wizard you can specify the location of the exported
property in the
group/section. The export wizard is depicted in the following
property can be used to specify a sub-folder
in the destination which
contains the complete exported application.
This is useful if you
export the product as an archive file.
The resulting directory can be for example compressed (zipped) and shared with others. The export dialog allows you to create an archive file directly, which makes it easier to transfer all files to another machine.
If you transfer the content of this directory to another machine (with the same architecture, e.g. Linux 64 bit) your application can start on this machine. Of course the correct Java version must be installed there.
The plug-ins artifacts which are included in an export are
file of an plug-in.
Eclipse adds the compiled Java classes by default. You have to add other files manually, e.g. icons or splash screen images.
Make sure the following items (if available) are included in each plug-in of the exported application::
other static files, e.g. icons, splash.bmp, etc.
OSGi service definition files
An Eclipse application started
the Eclipse IDE
resources which are not
files will not be
contained in the
therefore fail to find the
Always include new resources directly in the
file. This is a good rule to avoid errors after the export of your
contains the platform specific features and
to build and export
Eclipse applications for
It also includes binary launchers
for all platforms
The delta pack can be found on the following URL: Eclipse download page .
Click on the release you are interested in, e.g. 4.3 and search on the resulting page for the Delta word.
Download it and extract it to a new directory.
You can also deploy your own RCP application bundled with a JRE
certain JRE is used. An Eclipse application first
installation directory for a folder called
and for a
If it finds one, then this JRE is used to
To include the JRE from your running environment, select the Bundle JRE for this environment with the product flag on the Launching tab of your product configuration file.
A headless build is an automatic build without user interaction and without a graphical user interface. It can be triggered from the command line. Typically the build is automatically done via an additional software component called the build server which does so in a clean (and remote) enviroment.
An example for a build server would be the Jenkins continous integration (system). See the online Jenkins tutorial for an introduction into the setup, configuration and usage of Jenkins.
Several solutions exists for building Eclipse RCP applications via a headless build. Currently the most popular approach is based on Apache Maven. See the online Maven Tycho tutorial for an introduction into headless builds for Eclipse RCP applications.
Create an Eclipse 4 RCP application in a plug-in called com.example.e4.rcp.wizard.
file of your
project to export your Eclipse application.
Enter a new directory in the Directory field. If in doubt use the Browse button to find a valid directory. The following screenshot shows an example selection under Ubuntu.
After the export check the
folder in the
double-click on the
launcher starts your
Make sure that you can start the application from your exported directory.
If you face issues during the product export, check the list of common export problems from Section 6, “Common problems while exporting your product” and try to solve the problem.
Add a splash screen to your application. For this create or download
bitmap file. You find an example under the following URL:
Example splash screen.
file to the main directory of your
application. You can copy and paste
it into the
If you add files outside of the Eclipse IDE, you need to Refresh (via F5) your project in the Project Explorer view, to see the file in Eclipse.
Afterwards your project should look like the following screenshot.
The file name and the location of the file must be correct otherwise Eclipse will not use your splash screen.
On the Splash tab of your product configuration file, define that your application plug-in contains the splash screen.
Verify that the splash is displayed if you start your application from the Eclipse IDE.
Configure that the
file is included into the exported application by adding it to the
file of your application plug-in.
Export your product again and ensure that the splash screen is also shown if you start the exported application. Make sure that the target directory of the export is empty before you start the export.
The Eclipse export defaults the launcher for your Eclipse RCP application to eclipse, e.g. on Windows to eclipse.exe.
Change this launcher name to mywizard on the Launching tab of your product configuration file.
Export your product again and validate that the launcher name has changed.
Create a new feature project called com.example.e4.rcp.wizard.feature via→ → → → .
plug-in into this feature.
Open your product configuration file and select the Overview tab.
Select the option that your product configuration file is based on features. This selection is highlighted in the following screenshot.
Add your new feature to this product, as well as the
and its dependencies. As a result of this you should have four
features in your
All four features are required to start your application. Assure you start via the product and not with an existing launch configuration to ensure that your new product configuration is used.
Test that your application starts from the Eclipse IDE. Afterwards export is again into an empty directory and ensure that it starts also as exported application.
The most common problem is that the folder to which you export is not empty. If you export to a certain folder, ensure that the folder is empty. Exporting twice to the same folder may create file locks or results in error messages reporting version conflicts.
If the export encounters a problem please have a look into the following table for a solution:
Table 1. Problems with the product export
|Export fails||Try using an empty target directory, sometimes the export cannot delete the existing files and therefore fails.|
|No executable file after the export||Check the flag "The product includes native launcher artifacts" in your .product file on the Overview tab.|
|Product could not be found||Validate that all dependencies are included in the product. Delete an existing launch configuration and restart the product from the IDE to see if everything is configured correctly.|
|Splash screen or other icons are missing||
|Splash screen is missing||Ensure that you have entered the defining plug-in in the "Splash" tab on the product configuration file. If this is not set, the splash screen is not displayed after the export. Unfortunately, it is displayed if you start the plug-in from the Eclipse IDE.|
|Issues during startup||Check the log file in the workspace folder of your exported application to see the error messages during startup. Alternatively add the "-consoleLog" parameter to the ".ini" file in folder of the exported application.|
|applicationXMI argument is missing||
|Service could not be found or injected||
Make sure that the bundle which provides the service has the
Activate this plug-in when one of its classes is
flag set. Also
|Application ID could not be found||
level of 1 and set auto-start to true for the
|Translations not available in the exported product||
Ensure via the
If you find errors in this tutorial, please notify me (see the top of the page). Please note that due to the high volume of feedback I receive, I cannot answer questions to your implementation. Ensure you have read the vogella FAQ as I don't respond to questions already answered there.
vogella Training Android and Eclipse Training from the vogella team
Android Tutorial Introduction to Android Programming
Eclipse RCP Tutorial Create native applications in Java
JUnit Tutorial Test your application
Git Tutorial Put all your files in a distributed version control system