Connecting Tech Pros Worldwide Forums | Help | Site Map

SWT Extension toolKit - java.lang.UnsatisfiedLinkError

Ganesh9u's Avatar
Newbie
 
Join Date: Oct 2008
Location: INDIA
Posts: 23
#1: Aug 24 '09
Hi All,

import org.sf.feeling.swt.win32.extension.hook.Hook;
import org.sf.feeling.swt.win32.extension.hook.data.HookD ata;
import org.sf.feeling.swt.win32.extension.hook.data.Mouse HookData;
import org.sf.feeling.swt.win32.extension.hook.listener.H ookEventListener;

public class HotMouse
{

public static void main(String[] args) {
Hook.MOUSE.addListener(new HookEventListener() {
public void acceptHookData(HookData hookData) {
if (hookData != null)
{
System.err.println(((MouseHookData)hookData).getPo intX()"," ((MouseHookData)hookData).getPointY());
}
if (hookData.getWParam() == 513) { System.out.println("left button pressed");// left button pressed
} else if (hookData.getWParam() == 514) { System.out.println("left button released");// left button released
} else if (hookData.getWParam() == 516) { System.out.println("right button pressed");// right button pressed
} else if (hookData.getWParam() == 517) { System.out.println("right button");// right button
} else if (hookData.getWParam() == 519) { System.out.println("middle button 519");// middle button
} else if (hookData.getWParam() == 520) { System.out.println("middle button 520");// middle button
}
}
});
Hook.MOUSE.install();
}

}


I have Used SWT Win32 Extension 1.0.5 toolkit for Mouse & Keyboard hook operation, in java.
I am using Eclipse J2EE Latest version, I also added those external jar files(SWT Win32 Extension all Jar files),
At design time I did not get any error when I run this program.


When I Run this Program I got the error as

Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no swt-extension-win32 in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at org.sf.feeling.swt.win32.internal.extension.Extens ion.<clinit>(Extension.java:42)
at org.sf.feeling.swt.win32.internal.extension.EventO bject.<init>(EventObject.java:34)
at org.sf.feeling.swt.win32.extension.hook.Hook$HookE ventLoop.run(Hook.java:328)
at java.lang.Thread.run(Unknown Source)

What might be the problem ? and what can be done. any solution.

-Thanks In Advance..

JosAH's Avatar
Expert
 
Join Date: Mar 2007
Posts: 10,611
#2: Aug 24 '09

re: SWT Extension toolKit - java.lang.UnsatisfiedLinkError


Quote:

Originally Posted by Ganesh9u View Post

When I Run this Program I got the error as

Exception in thread "Thread-0" java.lang.UnsatisfiedLinkError: no swt-extension-win32 in java.library.path

What might be the problem ? and what can be done. any solution.

I never used SWT but that error message indicates that a .so (or .dll) file could not be found for loading; the jvm wants to load the file 'swt-extension-win32' but can't find it anywere on the path 'java.library.path' designated for dynamic link libraries.

kind regards,

Jos
Reply

Tags
swt unsatisfiedlinkerror