Search code examples
eclipsercpe4

Adding Files to the Root of a Eclipse e4 rcp application


In order to add some configuration files to an Eclipse e4 rcp application, I have followed the steps from greg-449 in this link:

The application is featured based, and in the feature project folder I have attached the file "test_config_file.txt"

At feature´s 'build.properties' file are the next lines:

bin.includes = feature.xml
root=file:test_config_file.txt

Basically it is what is stated at the above link.

When I run the product (via Run Configuration), the file is not copied to the folder where the Run Configuration locates the product.


Solution

  • The configuration in the feature is only used when you build / export a product.

    When running the code using a Run Configuration you will have to put the files in the correct location manually. Alternatively your code could support a command line argument to specify the location of the file.