Word Gems

A personal interest blog about computergraphics, rendering and usefull C++ and Python stuff.

Using jpcap under win 7 (x64)

While using the jpcap project unter Windows 7 I stumbled upon this error:

Exception in thread “main” java.lang.UnsatisfiedLinkError: no jpcap in java.library.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1738)
    at java.lang.Runtime.loadLibrary0(Runtime.java:823)
    at java.lang.System.loadLibrary(System.java:1028)
    at jpcap.JpcapCaptor.<clinit>(JpcapCaptor.java:251)
    at PacketReceiver.run(PacketReceiver.java:19)
    at Main.main(Main.java:16)

It was caused by using the 64 bit java JDK. I installed the x86 version of the JDK and set it in the Eclipse preferences. That fixed the linking error and should help anybody having the same problem.

Eclipse Preferences

The newest JRE and JDK can be found here: http://www.oracle.com/technetwork/java/javase/downloads/

Filed under: Java, jpcap, Network