求助 jpcap 使用遇到问题
已安装winpcap,jpcap是不需要安装的,开发环境是eclipse。我已经按照下面文档进行了环境配置:http://wenku.baidu.com/view/33db9e16866fb84ae45c8daa.html ,可是在使用的时候还是遇到了问题。
以下的import部分,没有提示错误:
import jpcap.*;
import jpcap.packet.*;
import java.net.InetAddress;
import java.net.UnknownHostException;
import java.io.*;
import java.util.*;
但是下面使用的时候就有问题了:
private NetworkInterface[] devices = JpcapCaptor.getDeviceList();
提示错误:
一、NetworkInterface[]处 :Access restriction: The type NetworkInterface is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\jpcap.jar
二、JpcapCaptor.getDeviceList()处 :Access restriction: The method getDeviceList() from the type JpcapCaptor is not accessible due to restriction on required library C:\Program Files\Java\jdk1.6.0_10\jre\lib\ext\jpcap.jar
按照提示信息,似乎是权限问题,如果真是那怎么解决呢,如果不是,那又是什么问题呢?
求助