I'm trying to set up a project that uses jpcap in order to detect network traffic. I've tried various ways to get it to work, however every way ends up in errors. I run windows 64 bit, but here's what I've done:
- Installed winpcap
- Installed jpcap
- Copied jpcap.dll to the JRE directory (program files/JRE AND program files (x86)/JRE)
- Copied jpcap.jar to the JRE directory/lib/ext
- Copied jpcap.jar to the JDK directory
After doing all that, I add the jpcap.jar to my build path. When I try to compile a simple line, I get the error:
Exception in thread "main" java.lang.UnsatisfiedLinkError: jpcap.JpcapCaptor.getDeviceList()[Ljpcap/NetworkInterface;
In the other version of eclipse, I get a different error, following the same steps:
Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\Program Files\Java\jre7\bin\jpcap.dll: Can't load IA 32-bit .dll on a AMD 64-bit platform
The line of code I'm using in both cases is:
list = JpcapCaptor.getDeviceList();
Any help to get this working would be greatly appreciated! Thanks