1 Reply Latest reply on Apr 1, 2009 6:41 PM by jschellSomeoneStoleMyAlias

    java.lang.UnsatisfiedLinkError

    843829
      I'm using eclipse package to display a simple DirectoryChooser, and when ever I try to run my jar file I have the following message
      Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3232 in java.library.path ....etc
      the code is very simple when I click a button the following code must executed
      public void actionPerformed(java.awt.event.ActionEvent e) {
                          Display display = new Display();
                          final Shell shell = new Shell(display);
      
                          DirectoryDialog dlg = new DirectoryDialog(shell);
                          String selectedDirectory = dlg.open();
                          System.out.println(selectedDirectory);
                          display.dispose();
                      }
      I created a manifest file as well:
      Manifest-Version: 1.0
      Main-Class: com.tests.DirectoryDialogGetSelectedDirectory
      Class-Path: org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar
      I put the generated jar (sample.jar) file and org.eclipse.swt.win32.win32.x86_3.2.0.v3232m.jar in the same folder and and when I run sample.jar and click the button I have

      Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no swt-win32-3232 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.eclipse.swt.internal.Library.loadLibrary(Library.java:123)
           at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
           at org.eclipse.swt.widgets.Display.<clinit>(Display.java:125)
           at com.tests.DirectoryDialogGetSelectedDirectory$1.actionPerformed(DirectoryDialogGetSelectedDirectory.java:32)
           at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
      .... etc

      any ideas ??