Hi, I noticed that when I first ran Main.java, I received a
java.lang.UnsatisfiedLinkError, which says it can't load dependency
libraries when it was trying to load ftd2xxj.dll, as attached in the error
stack below:
Dec 5, 2008 9:56:55 AM com.ftdichip.ftd2xx.ui.deviceTree.DevicesTreePanel$1
run
SEVERE: Failed to refresh device list.
java.lang.UnsatisfiedLinkError: E:\research\projects\Altera\Stratix IV
GX\projects\usb controller\web applications\civetserver\jni\drivers\ftdi
d2xx usb\ftd2xxj\ftd2xxj-2.1-src\lib\ftd2xxj.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 com.ftdichip.ftd2xx.Service.<clinit>(Service.java:101)
at
com.ftdichip.ftd2xx.ui.deviceTree.DevicesTreeModel.createTree(DevicesTreeMo
del.java:50)
at
com.ftdichip.ftd2xx.ui.deviceTree.DevicesTreeModel.refresh(DevicesTreeModel
.java:41)
at
com.ftdichip.ftd2xx.ui.deviceTree.DevicesTreePanel.refresh(DevicesTreePanel
.java:126)
at
com.ftdichip.ftd2xx.ui.deviceTree.DevicesTreePanel$1.run(DevicesTreePanel.j
ava:94)
at java.util.TimerThread.mainLoop(Unknown Source)
at java.util.TimerThread.run(Unknown Source)
I then used a dependency tool to find out what library the ftd2xxj.dll is
dependent upon. I soon found out that it actually wraps ftd2xx.dll, which
means it actually "depends" on this library.
This would mean that we should load this library (ftd2xx.dll) before we try
to load ftd2xxj.dll. I added another line above the
System.loadLibrary("ftd2xxj"), that tries to load ftd2xx.dll first, and the
Main UI was brought up nicely. :)
System.loadLibrary("ftd2xx"); -- Line 100 of Service.java; this line
should be added to load ftd2xx.dll before loading ftd2xxj.dll.
System.loadLibrary("ftd2xxj");
Nobody/Anonymous
ftd2xxj
2.1
Public
|
Date: 2009-07-14 06:34 Hi Daniel, |
| Field | Old Value | Date | By |
|---|---|---|---|
| resolution_id | None | 2009-07-14 06:34 | mike_werner |
| artifact_group_id | None | 2008-12-05 02:11 | daniel-kho |
| priority | 5 | 2008-12-05 02:11 | daniel-kho |