SWT Extension toolKit - java.lang.UnsatisfiedLinkError

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Ganesh9u
    New Member
    • Oct 2008
    • 23

    #1

    SWT Extension toolKit - java.lang.UnsatisfiedLinkError

    Hi All,

    import org.sf.feeling. swt.win32.exten sion.hook.Hook;
    import org.sf.feeling. swt.win32.exten sion.hook.data. HookData;
    import org.sf.feeling. swt.win32.exten sion.hook.data. MouseHookData;
    import org.sf.feeling. swt.win32.exten sion.hook.liste ner.HookEventLi stener;

    public class HotMouse
    {

    public static void main(String[] args) {
    Hook.MOUSE.addL istener(new HookEventListen er() {
    public void acceptHookData( HookData hookData) {
    if (hookData != null)
    {
    System.err.prin tln(((MouseHook Data)hookData). getPointX()"," ((MouseHookData )hookData).getP ointY());
    }
    if (hookData.getWP aram() == 513) { System.out.prin tln("left button pressed");// left button pressed
    } else if (hookData.getWP aram() == 514) { System.out.prin tln("left button released");// left button released
    } else if (hookData.getWP aram() == 516) { System.out.prin tln("right button pressed");// right button pressed
    } else if (hookData.getWP aram() == 517) { System.out.prin tln("right button");// right button
    } else if (hookData.getWP aram() == 519) { System.out.prin tln("middle button 519");// middle button
    } else if (hookData.getWP aram() == 520) { System.out.prin tln("middle button 520");// middle button
    }
    }
    });
    Hook.MOUSE.inst all();
    }

    }


    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.Unsat isfiedLinkError : no swt-extension-win32 in java.library.pa th
    at java.lang.Class Loader.loadLibr ary(Unknown Source)
    at java.lang.Runti me.loadLibrary0 (Unknown Source)
    at java.lang.Syste m.loadLibrary(U nknown Source)
    at org.sf.feeling. swt.win32.inter nal.extension.E xtension.<clini t>(Extension.ja va:42)
    at org.sf.feeling. swt.win32.inter nal.extension.E ventObject.<ini t>(EventObject. java:34)
    at org.sf.feeling. swt.win32.exten sion.hook.Hook$ HookEventLoop.r un(Hook.java:32 8)
    at java.lang.Threa d.run(Unknown Source)

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

    -Thanks In Advance..
  • JosAH
    Recognized Expert MVP
    • Mar 2007
    • 11453

    #2
    Originally posted by Ganesh9u
    When I Run this Program I got the error as

    Exception in thread "Thread-0" java.lang.Unsat isfiedLinkError : no swt-extension-win32 in java.library.pa th

    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.p ath' designated for dynamic link libraries.

    kind regards,

    Jos

    Comment

    Working...