I want to use this jar file (http://sourceforge.net/projects/uirt-j/) in a personal project. Currently, I've been using Eclipse and tried to Project > Java Build Path > Add External JARs to import that jar.
After importing it, I can see all classes from that package listed in Eclipse, however, this jar also contains two win32 dll files, needed to communicate to the device. I've tried to add them to System32 dir, but no luck. When that code runs, it throws the following exception:
Exception in thread "main" java.lang.UnsatisfiedLinkError:
C:\Windows\System32\util_USBUIRT.dll: Can't find dependent libraries
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
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 util.USBUIRT.<clinit>(USBUIRT.java:269)
at Uirt.main(Uirt.java:6)
Using dependence walker, I can see that all the dlls are correctly linked can be imported.
This is the code snippet I'm trying to run:
import util.USBUIRT;
public class Uirt {
public static void main(String[] args) {
String code = "0000";
try {
USBUIRT.transmitIR(code, 2, 3, 2);
} catch (Exception e) {
e.printStackTrace();
}
}
}
If that JAR file is executed standalone, it works fine. My current setup runs under Windows 7 64bits.