Inclusion and access to binary (non-Java) files in the Eclipse plugin

I want to add some non-Java binaries to my Eclipse plugin, so I can access them later from the Java plugin code.

1) As far as I understand, I can add some files and folders for inclusion in the assembly in the "Build / Binary Build" section of the assembly configuration:

enter image description here

Unfortunately, the folder is a folder for inclusion and all the files below are not copied to the bin folder (or anywhere else) after creating the plugin. Did I not understand this dialogue? I always thought of the bin folder as the "root" of the embedded project / plugin. What is the correct way to include binaries in an assembly?

2) , , Java ?

+3
1

, , ( bin).

:

URL url = FileLocator.find(bundle, new Path(path), null);

path - , bundle - bundle. bundle BundleContext, , Platform.getBundle("plugin id")

URL, , bundle, file:

URL fileURL = FileLocator.toFileURL(url);

URL- .

. Eclipse ( "/Eclipse" ), . API FileLocator , .

+3

All Articles