swtIbmWrapper (Not found in java.library.path)

When I’m doing proff-of-concept code for SWT based plugins for Notes I often times simply use a popup Shell constructed from Eclipse. This is much easier and faster than using a full Notes launch for this kind of stuff. After moving to IBM Notes 9 I had an issue with this approach and would see stacktraces like the below when trying to launch my shells.

23-01-2013 09:21:20 OS loadIBMSwtWrapperLibrary
Throwable occurred: java.lang.UnsatisfiedLinkError: swtIbmWrapper (Not found in java.library.path)
	at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:1018)
	at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:982)
	at java.lang.System.loadLibrary(System.java:506)
	at org.eclipse.swt.internal.win32.OS.loadIBMSwtWrapperLibrary(OS.java:6977)
	at org.eclipse.swt.internal.win32.OS.(OS.java:6993)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
	at org.eclipse.swt.widgets.Display.(Display.java:139)
	at java.lang.J9VMInternals.initializeImpl(Native Method)
	at java.lang.J9VMInternals.initialize(J9VMInternals.java:200)
	at test_paint.BaseTest.run(BaseTest.java:17)
	at test_paint.Main.main(Main.java:17)
Exception in thread "main" java.lang.UnsatisfiedLinkError: org/eclipse/swt/internal/win32/OS.VtblCallWrapped(II)I
	at org.eclipse.swt.internal.win32.OS.VtblCall(OS.java:6997)
	at org.eclipse.swt.widgets.Display.init(Display.java:2828)
	at org.eclipse.swt.graphics.Device.(Device.java:138)
	at org.eclipse.swt.widgets.Display.(Display.java:490)
	at org.eclipse.swt.widgets.Display.(Display.java:481)
	at test_paint.BaseTest.run(BaseTest.java:17)
	at test_paint.Main.main(Main.java:17)

The solution was to add the DLL-directory (I’m on Windows) for the org.eclipse.osgi plugin to the native libraries location in my launch configuration. My Notes client is installed in C:Notes9 so the full path for Notes 9 Beta is “C:Notes9Dataworkspace.configorg.eclipse.osgibundles12001.cp”. Adding that in the build path dialog for org.eclipse.osgi solved the issue.

2 thoughts on “swtIbmWrapper (Not found in java.library.path)”

  1. … and really confusing is, that if you want to execute your SWT code on another Lotus Notes installation the directory is slightly different.

    BTW: I do have this already with Lotus Notes 8.5.x


  2. Hi Mikkel!
    Thank you very much for this post. I ran into the same problem, after i have upgraded my Notes to Version 9. The simplest way to get the correct directory is to search for "swtIBMWrapper.dll" in the org.eclipse.osgibundles directory.


Comments are closed.