Reputation: 665
How can I access a jar file in plugin A while the jar is available in another plugin B.
I added plugin B as dependency to plugin A but it seems not working. Actually the plugin B is just a wrapper plugin which contains the jar file and I want this jar to be available in different plugins.
How can I achieve this in RCP application.
Edit
I added the jar under Runtime ->classpath in the manifest added all the packages under Runtime -> Exported Packages and in the plugin where I need it I added the wrapper plugin as dependency.
When I try to execute this code
try {
Class.forName( "net.ucanaccess.jdbc.UcanaccessDriver" );
} catch (ClassNotFoundException e) {
e.printStackTrace();
}
I get the following error
java.lang.NoClassDefFoundError: com/healthmarketscience/jackcess/util/ErrorHandler
Thanks
Upvotes: 2
Views: 806
Reputation: 111142
In the MANIFEST.MF editor for the plugin containing the jar add the jar to the 'Classpath' on the 'Runtime' tab. You should then be able to export the packages in the jar in the 'Exported Packages' section.
These steps update the Bundle-ClassPath
and Export-Package
entries in the plugin MANIFEST.MF
Upvotes: 2