线程"main"中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有jpcap [英] Exception in thread "main" java.lang.UnsatisfiedLinkError: no jpcap in java.library.path

查看:334
本文介绍了线程"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"));

您应该获得目录列表.您的jpcapDLL(在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's PATH (preferred).
  • Add the DLL/so into one of the directories printed.

这篇关于线程"main"中的异常java.lang.UnsatisfiedLinkError:java.library.path中没有jpcap的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆