Exception in thread “main” java.lang.UnsatisfiedLinkError: no jpcap in java.library.path

心不动则不痛 提交于 2020-01-03 09:20:18

问题


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

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

please help!


回答1:


Add this to the beginning of your program:

System.out.println(System.getProperty("java.library.path"));

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:

  • Add the directory containing that DLL/so to your system's PATH (preferred).
  • Add the DLL/so into one of the directories printed.


来源:https://stackoverflow.com/questions/13806199/exception-in-thread-main-java-lang-unsatisfiedlinkerror-no-jpcap-in-java-libr

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!