日期:2014-05-20  浏览次数:21314 次

Exception in thread "AWT-EventQueue-0"
在做个抓包+分析的简单软件,图形用户界面能出来了,但是一按“开始监听”就弹出了这一大串错:
Exception in thread "AWT-EventQueue-0" java.lang.UnsatisfiedLinkError: no jpcap in java.library.path
at java.lang.ClassLoader.loadLibrary(Unknown Source)
at java.lang.Runtime.loadLibrary0(Unknown Source)
at java.lang.System.loadLibrary(Unknown Source)
at jpcap.Jpcap.<clinit>(Jpcap.java:151)
at gui.ListenBegin.<init>(ListenBegin.java:20)
at gui.ListenBegin.getJpcap(ListenBegin.java:143)
at gui.JCaptor.capturePacketsFromDevice(JCaptor.java:89)
at gui.UserInterface.actionPerformed(UserInterface.java:217)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
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.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
从字面上看是找不到jpcap库,可是我已经把wincap装上了,jpcap.jar、jpcap.dll也放对位置了,怎么会这样。。

------解决方案--------------------
要把那些DLL文件所在目录加到PATH环境变量中。
------解决方案--------------------
代码不完整。

现在还是看不出哪里有问题。。
------解决方案--------------------
探讨
引用:
要把那些DLL文件所在目录加到PATH环境变量中。

我用MyEclipse做开发工具的,是写在.classpath文件下么?