Java troubleshooting


UnsatisfiedLinkError

Exception in thread "main" java.lang.UnsatisfiedLinkError: no jnaoqi in
java.library.path

Please make sure that the java.library.path property is correctly set.

::
Exception in thread “main” java.lang.UnsatisfiedLinkError: jnaoqi.dll: Can’t load IA 32-bit .dll on a AMD 64-bit platform at java.lang.ClassLoader$NativeLibrary.load(Native Method) at java.lang.ClassLoader.loadLibrary1(Unknown Source) at java.lang.ClassLoader.loadLibrary0(Unknown Source) at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) at java.lang.System.loadLibrary(Unknown Source) at net.Main.<clinit>(Main.java:125)

You are using Java 64bits. Please make sure to use a 32bits JRE, even on a 64bits Windows.

# Download and install the jdk 32 bits from oracle’ s web site

# Then, add the 32bits jre to eclipse:

File / Properties / JRE System Libraries / Alternate JRE / Installed JREs ...

Then Search ...

The select C:\Program Files (x86)\Java

Then give it a reasonable name (for instance jre7-32bits

You should end up with something looking like this:

../../_images/java_eclipse-select-jre.png

# Create a new Java project:

JRE/ Use a project specific JRE, and select jre7-32bits from the list

# Alternatively, you can just right-click on the ‘ JRE System Library’ in the package explorer,
and choose an alternate JRE from here.