-1

我正在运行用 java 1.4 版本编码的 java 桌面应用程序。我使用 eclipe 作为我的 ide,并尝试在该项目中以 java 1.6 版本运行该应用程序,他们使用 jcom jar 文件将数据导出到 Excel 表。当我尝试单击桌面应用程序中的 excel 按钮时。该功能不起作用并抛出异常。但我在我的项目资源管理器中正确构建路径 jcom jar 存在于引用的库中。任何人都可以帮助我解决这个异常。提前致谢。

线程“AWT-EventQueue-1”中的异常 java.lang.UnsatisfiedLinkError:java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) 的 java.library.path 中没有 jcom .lang.System.loadLibrary(Unknown Source) at jcom.IDispatch.(IDispatch.java:287) at .StockManager.BusinessSheets.exportToExcel(BusinessSheets.java:2302) at .StockManager.BusinessSheets$BusinessSheetPanel$3.mouseClicked(BusinessSheets.java :439) 在 java.awt.AWTEventMulticaster.mouseClicked(Unknown Source) at java.awt.Component.processMouseEvent(Unknown Source) at javax.swing.JComponent.processMouseEvent(Unknown Source) at java.awt.Component.processEvent(Unknown Source) ) 在 java.awt.Container.processEvent(Unknown Source) 在 java.awt.Component.dispatchEventImpl(Unknown Source) 在 java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source) at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source) at java.awt。 LightweightDispatcher.dispatchEvent(Unknown Source) at java.awt.Container.dispatchEventImpl(Unknown Source) at java.awt.Window.dispatchEventImpl(Unknown Source) at java.awt.Component.dispatchEvent(Unknown Source) at java.awt.EventQueue。 dispatchEventImpl(Unknown Source) at java.awt.EventQueue.access$000(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.awt.EventQueue$1.run(Unknown Source) at java.security.AccessController java.security.AccessControlContext$1 处的 .doPrivileged(Native Method)。doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.awt.EventQueue$2.run(Unknown Source) at java.security.AccessController .doPrivileged(Native Method) at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source) at java.awt.EventQueue.dispatchEvent(Unknown Source) at .StockManager.WaitCursorEventQueue.dispatchEvent(WaitCursorEventQueue.java:23) at java.awt。 EventDispatchThread.pumpOneEventForFilters(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source) at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source) at java.awt.EventDispatchThread.pumpEvents(Unknown Source) at java.awt.EventDispatchThread。java.awt.EventDispatchThread.run(未知源)上的 pumpEvents(未知源)

4

2 回答 2

3

情况 1: jcom.dll不在路径中。

jcom.dll解决方案 放入C:/Windows/System32

情况2: jcom.dll被其他进程使用

解决方案: 尝试找到该进程并将其杀死。

于 2012-06-07T10:20:38.047 回答
0

用于 JNI 共享库,java.library.path例如DLLs.so文件。看来您的jcom.jar(您可以看到它正在加载到堆栈的第三行,以便它找到 JAR)需要一个jcom.dll. 在 Windows 上,这必须在您的 PATH 或 java.library.path 中

于 2012-06-07T10:14:11.350 回答