1

I am new to RCP applications and this might be a newbie question. I've been trying to add jna and jna-platform(4.5.1) to the application and I've been getting a 'org.osgi.framework.BundleException: No Bundle-NativeCode match' exception. I tried modifying the manifest.mf entry to have(as mentioned in a previous post in the jna user group):

Bundle-NativeCode: com/sun/jna/win32-x86/jnidispatch.dll;processor=x86
 ;osname=win32,com/sun/jna/win32-x86/jnidispatch.dll;processor=x86;osn
 ame=win,*

but that did not help. I checked the jna jar thats pulled in and it has jnidispatch.dll in the path mentioned. I am also setting the osgi configuration to win32/x86. Would the manifest also need the dlls that I use through jna or would jnidispatch.dll be enough?

OS - Microsoft Windows 10 Enterprise, Jna version - 4.5.1

nahzor
  • 460
  • 1
  • 4
  • 20
  • 1
    You should check for the use of JNI inside OSGI container. May be this helps https://stackoverflow.com/questions/1375550/load-dll-using-jna-inside-an-osgi-bundle – gavioto Feb 15 '18 at 09:46
  • 1
    It looks like a issue with the OS aliases that were provided in eclipse. The alias there was 'win32' for windows. I manually set it to 'win' in the configuration file and it started to work. I didn't need the 'Bundle-NativeCode' part either. This is weird because the osgi page shows win32 as a valid alias for Windows 10 OS. – nahzor Feb 16 '18 at 16:20

0 Answers0