Search code examples
eclipse-rcp

How to copy resources to bin folder


I'm trying to create a Plug-in project that reads a text file from a folder called "resources" of the same project.

From what I understood is that I need to add this folder to the build.properties like this:

source.. = src/
output.. = bin/
bin.includes = META-INF/,\
               .,\
               resources/

However, after compiling my bin folder does not include the resources folder nor any of its files.

Is there any obvious mistake?


Solution

  • The final plug-in does not normally have a bin folder.

    The bin.includes specifies which folders are copied in to the final plug-in. So your setting will give you a resources folder in the plug-in.

    Use the FileLocator class to find resources in a plug-in.