Abdousoft
Abdousoft

Reputation: 97

How to proceed with this exception java.lang.UnsatisfiedLinkError?

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

Upvotes: 1

Views: 10784

Answers (4)

Milind Kaulgud
Milind Kaulgud

Reputation: 1

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

Upvotes: 0

Bug
Bug

Reputation: 483

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).

Upvotes: 0

Nestor
Nestor

Reputation: 756

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.

Upvotes: 2

roni bar yanai
roni bar yanai

Reputation: 1492

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)

Upvotes: 1

Related Questions