Michael K.
Michael K.

Reputation: 1788

Can't access properties file

I've made a plugin from external jar. In this jar there is access to properties file:

final Properties properties = new Properties();
final String fileName = "/" + thisClass.getName() + ".properties";
InputStream inputStream;
try
{
  inputStream = thisClass.getResourceAsStream(fileName);
  properties.load(inputStream);
}

In my RCP-Application the inputStream is null. I've also exported the default package in the plugin. What's wrong.

Upvotes: 2

Views: 539

Answers (1)

Michael K.
Michael K.

Reputation: 1788

I've solved my problem. The solution is to make an Eclipse-BuddyPolicy Entry to the Manifest.mf of the plugin with the external jar.

Eclipse-BuddyPolicy: global

This is described in the Eclipse Help: Platform Plugin Developer Guide-->Reference-->Other reference information-->Third party libraries and classloading

Upvotes: 4

Related Questions