I want to separate some DLLs from the associated native JNI classes.
Plugins:
- In plugin A the dlls are placed and loaded when the plugin is loaded.
- In plugin B (depend on A) the JNI classes are placed which include the native method calls for the DLLs in A.
At runtime i get a UnsatisfiedLinkError because the JNI class can't be found. I try to update the classloader logic by updating the MANIFEST files:
Plugin A:
Eclipse-BuddyPolicy: registered
Plugin B:
Eclipse-RegisterBuddy: A
But this is also not working. Do you know a solution?
EDIT:
MANIFEST A:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: xxx ;singleton:=true
Bundle-Version: 1.0.0
Bundle-Activator: xxx.Plugin
Bundle-Vendor: xxx
Bundle-Localization: plugin
Bundle-NativeCode: native/dll/x1.dll;
native/dll/x2.dll;
native/dll/x3.dll;
native/dll/x4.dll;
native/dll/x5.dll;
native/dll/x76.dll;
native/dll/x.dll;
native/dll/x7.dll;osname = win32; processor = x86
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
org.apache.commons.logging
Bundle-ClassPath: .
Eclipse-AutoStart: true
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy
Eclipse-BuddyPolicy: registered
Export-Package: xxx
MANIFEST B:
Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: %plugin.name
Bundle-SymbolicName: xxx;singleton:=true
Bundle-Version: 2.1.16
Bundle-Vendor: xxx
Bundle-Localization: plugin
Require-Bundle: org.eclipse.core.runtime,
org.eclipse.ui,
org.apache.commons.lang,
org.apache.commons.logging,
A
Export-Package: xxx
Bundle-ClassPath: .
Bundle-Activator: xxx
Eclipse-RegisterBuddy: A
Eclipse-AutoStart: true
Eclipse-LazyStart: true
Bundle-ActivationPolicy: lazy