plugin access to a policy file [message #165002] |
Thu, 17 June 2004 14:07 |
Eclipse User |
|
|
|
Originally posted by: michael.shopkowski.sas.com
I am developing a plugin that will use another groups jar file to do
various RMI things. The jar requires access to a policy file in the
plugin. The jar code uses code like that below to find the file, which
fails, I think, because it is done within a plugin.
cl = ClassLoader.getSystemClassLoader();
cl.getResource(policyName);
I have tried to trick things by doing the following before accessing the
file, which worked in 3.0M4 but fails in RC1...odd that.
Thread.currentThread().setContextClassLoader(MyPlugin.class. getClassLoader());
So the questions are
1) What is the correct way for a plugin to read a file that is part of the
plugin, installed who knows where.
2) Is there a simple way to force the Plugins classloader to be the
SystemClassLoader
3) Is there a better way or do I compell another groups generalized
solution to be modified for plugin access.
|
|
|
Powered by
FUDForum. Page generated in 0.03282 seconds