java - eclipse osgi: how to load class from a specific bundle -
i have 2 bundles both active in framework. each of them has version of set of classes under same full name, example, org.eclipse.jface.util.ilogger. in code, if write
system.out.println(ilogger.class.getclassloader());
i can see class loader 1 of bundle. problem need use class other one, not "default" bundle picked osgi framework. is, when write code like
ilogger logger = new ilogger(){}...
i need logger have type defined in other bundle. there way this? using eclipse 4.4. thanks
after playing while, got way it. on 'dependency' tab of manifest file, leave 1 bundle 'required plugins' , put package in use other bundle in 'imported packages'.
Comments
Post a Comment