I want to change the behavior of eclipse's parent-first classloader policy to child-first classloader policy. Th开发者_如何学运维e scenario would be :
Plugin A has class C in dependent external jar.
When the classloader of the jar looks for "META-INF" folder - it should find the META-INF folder of the jar and not the one found by its parent classloader - that is the plugin A's META-INF folder.
So I want to change the classloader policy to 'child-first' rather than 'parent-first'
Is it possible to do this by changing the plugin A's Manifest or plugin.xml?
You can put your JAR into separate OSGi bundle that will have own class loader (one that is set by OSGi). However in this case you should declare exported packages that are used in your plugin.
no it is not possible.
精彩评论