|Re: Load a class of a fragment dynamically from a String [message #499437 is a reply to message #499431]
||Sun, 22 November 2009 15:26
| Wim Jongman
Registered: July 2009
Hi Michelle, |
You have to export the package that delivers the class and import the package
in the plug-in that does the reflection (uses forname method). Instead of
Require-Bundle you use Import-Package.
here is a fragment from the MANIFEST.MF
> is there a chance to load a class with a String which consists the name of
the package and the name of the class. But not the name of the plugin, which
consists the class. But the plugin is loaded and activ.
> I tried it with thw following code. But I get a ClassNotFoundException.
> String className = aaa.test.TestClass;
> Class <?> testClass = Class.forName(className);
> What can I do, to get a instance of this class.
Powered by FUDForum
. Page generated in 0.01662 seconds