Eclipse RCP: ClassNotFoundException or How to make other bundle load my class

蹲街弑〆低调 提交于 2019-12-01 01:21:17

You might want to try buddy classloading. For more info on Eclipse classloading, Alex Blewitt has written an excellent overview of the classloading system in Eclipse here. Its a few years old, but for the most part it is still relevant.

The jist of buddy classloading is this:

  • a plugin declares that it needs help loading classes. It does this by declaring its "buddy plugin"

  • the buddy plugin declares its buddy policy

  • when the regular loading mechanism fails, Eclipse tries to use the buddy classloading policies you have specified.

So in your case, try putting:

Eclipse-BuddyPolicy: registered

in your Jalapeno plugin's manifest.mf file

and put:

Eclipse-RegisterBuddy: id.of.jalepeno.plugin

in the manifest.mf of your plugin

I am not sure, but maybe you have to export the package in which the classes are lying.

Select in the MANIFEST "Runtime" and add all packages

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!