| [news.eclipse.platform.rcp] Re: How to change the folder structure when exporting. |
If foo is at the root of the plugin folder, you need to include a '/' as in "/foo/file.txt". Otherwise foo is added at the end of the package of the Class used to call the getResourceAsStream method. If called from com.somepackage.AClass, the class loader will look for the file "com/somepackage/foo/file.txt".If you load the resource with class.getResourceAsStream("foo/file.txt") then it should work, regardless of whether it's packaged up as a Jar or not.
Alex.