1

this example of code generates an exception :

Exception in thread "main" java.lang.UnsatisfiedLinkError: no swt-win32-3235 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:134)
    at org.eclipse.swt.internal.win32.OS.<clinit>(OS.java:18)
    at org.eclipse.swt.widgets.Display.<clinit>(Display.java:125)
    at Snippet262.main(Snippet262.java:34)

What does it mean please and how can I resolve it ? Thank you

user207421
  • 305,947
  • 44
  • 307
  • 483
Abdousoft
  • 97
  • 1
  • 3
  • 12

4 Answers4

2

You need to add swt-win32-3235.dll to the library_path in your app. By default library_path equals to working dir (".") of your app. Or you may specify path to library_path in vm argument -Djava.library.path=path

So, 1.Check existing swt-win32-3235.dll in your library_path. 2. Check correct definition of library_path property.

Nestor
  • 756
  • 4
  • 8
  • Thank you for this clarification. I copied the swt-win32-3235.dll to the "." path and this work now. The probleme that I had is the incomplete jar library so I downloaded the library that contain this dll file. – Abdousoft Aug 18 '12 at 08:15
1

This is a runtime exception, that means that the code uses shared library's (using jni probably) which it cannot load. here you have two options:

  1. the shared library is not installed on you system.
  2. the path to the shared lib is not included in the LD_LIBRARY_PATH (on linux, not sure how it called on windows)
roni bar yanai
  • 1,492
  • 10
  • 12
  • Thank you for your clarification.I have effectively a problem with the shared library in my system. But it's resolved now ;) – Abdousoft Aug 18 '12 at 08:20
0

I got the error while running my application. The exception was

java.lang.UnsatisfiedLinkError exception : SK.gnome.twain.TwainManager.initialize(I[B[BZ)V

I fix it in eclipse as below step, Windows>Preferences>Java>Install JREs>check jre6-32 (check the appropriate versions of jre that you have install in your system).

m4rtin
  • 2,445
  • 22
  • 34
sashikanta
  • 341
  • 5
  • 19
0

I found that copying the SWT dll files to the Java's JRE bin directory solved this problem.

  • 1
    It is better not to tamper this directory with user libraries. See https://stackoverflow.com/questions/29891114/must-i-place-all-dependent-dlls-into-the-jdks-bin-folder for other options. – nquincampoix Apr 24 '23 at 13:46