线程"main"中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有jpcap
我正在使用netbeans ide,并尝试使用jpcap库捕获数据包.我的程序曾经在bu突然出现此错误之前可以正确运行
i am using netbeans ide and trying to capture packets using jpcap library. my program used to run correctly before bu suddenly this error
Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpcap in java.library.path
出现.我也曾在另一台计算机上尝试过ds,但没有成功. 我已经添加了jpcap库,并且在安装前完全清除了较旧的版本.已经竭尽所能.我严重陷入困境
is appearing. i have tried ds on my other computer too but in vain .. i have added jpcap library and before installing i cleared older version completely. have done everythng available .i am seriously in trouble
请帮助!
将其添加到程序的开头:
Add this to the beginning of your program:
System.out.println(System.getProperty("java.library.path"));
您应该获得目录列表.您的jpcap
的DLL
(在UNIX上为so
)必须位于这些目录之一中,以便程序正常运行.如果不存在,则可以:
You should get a list of directories. Your jpcap
's DLL
(or so
on UNIX) must be in one of these directories in order for your program to work. If it is not there, then either:
- 将包含该
DLL
/so
的目录添加到系统的PATH
(首选). - 将
DLL
/so
添加到打印的目录之一.
- Add the directory containing that
DLL
/so
to your system'sPATH
(preferred). - Add the
DLL
/so
into one of the directories printed.