我正在运行以java 1.4版本编码的java桌面应用程序。我使用eclipe作为我的ide并尝试在该项目的java 1.6版本中运行该应用程序,他们使用jcom jar文件将数据导出到Excel工作表。我试图点击桌面应用程序中的Excel按钮。该功能不起作用并抛出异常。但我在我的项目浏览器中正确构建路径jcom jar存在于引用的库中。可以任何一个PLZ帮助我理清这个例外。提前谢谢。
线程“AWT-EventQueue-1”中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有jcom at java.lang.ClassLoader.loadLibrary(Unknown Source) at java.lang.Runtime.loadLibrary0(Unknown Source) 在java.lang.System.loadLibrary(未知来源) 在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(未知来源) at java.awt.Component.processMouseEvent(Unknown Source) 在javax.swing.JComponent.processMouseEvent(未知来源) at java.awt.Component.processEvent(Unknown Source) at java.awt.Container.processEvent(Unknown Source) at java.awt.Component.dispatchEventImpl(Unknown Source) at 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) 在java.awt.EventQueue.access $ 000(未知来源) 在java.awt.EventQueue $ 1.run(未知来源) 在java.awt.EventQueue $ 1.run(未知来源) at java.security.AccessController.doPrivileged(Native Method) at java.security.AccessControlContext $ 1.doIntersectionPrivilege(Unknown Source) at java.security.AccessControlContext $ 1.doIntersectionPrivilege(Unknown Source) 在java.awt.EventQueue $ 2.run(未知来源) 在java.awt.EventQueue $ 2.run(未知来源) 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.pumpEvents(Unknown Source) 在java.awt.EventDispatchThread.run(未知来源)
答案 0 :(得分:3)
案例1:
jcom.dll
不在路径中。
<强>溶液:强>
将jcom.dll
放入C:/Windows/System32
案例2:
其他进程使用jcom.dll
<强>溶液:强> 试着找到那个过程并杀死它。
答案 1 :(得分:0)
java.library.path
用于JNI共享库,例如DLLs
或.so
个文件。看来您的jcom.jar
(您可以看到正在加载到堆栈的第三行,因此它找到JAR)需要jcom.dll
。在Windows上,这必须在您的PATH或java.library.path