jpcap.dll必须放jre的bin目录下?
jpcap的dll 必须放jre的bin目录 我是想一个程序给别人就能直接用 试过打jar包 把jpcap.dll 放jar包同一目录
dos下set path=.;%path%
结果还是出错:
Exception in thread "main"
java.lang.UnsatisfiedLinkError: jpcap.JpcapCaptor.getDeviceList()[Ljpcap/NetworkInterface;
at jpcap.JpcapCaptor.getDeviceList(Native Method)
at cn.essp.netstream.JpcNetstream.main(JpcNetstream.java:38)
如果删掉jar包一起的jpcap.dll报错不一样:
Exception in thread "main" 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.JpcapCaptor.<clinit>(JpcapCaptor.java:250)
at cn.essp.netstream.JpcNetstream.main(JpcNetstream.java:38)
------解决方案--------------------好像不一定.