Community
Participate
Working Groups
When I use the scrapbook to execute some program code that needs to retrieve a resource through a ClassLoader, the ClassLoader fails to find the url for the resource. This is the line which fails: URL url = classLoader.getResource(resource); (where resource is a string like "com/antelmann/resource/properties"). Executing the same code through using Run or Debug, the url is found and the resource file is obtained for getting properties off of the resource, a flat file containing some properties.
Retrieving resources is performed relative to the working directory. You can set the working directory on the "Scrapbook Runtime" properties of a scrapbook file (i.e. context menu: "Properties -> Scrapbook Runtime").
According to the release notes http://www.eclipse.org/eclipse/development/readme_eclipse_2_1_2.html#I-Platform- Core this is a known issue related to problems with classloaders in created threads. Applying the given suggestion worked for my scrapbook page. *** This bug has been marked as a duplicate of 8907 ***