解决Eclipse Access restriction: 问题

来源:互联网 发布:黑米软件吧 编辑:程序博客网 时间:2024/06/06 08:31

 今天在Linux下用eclipse 3.5开发Jpcap相关的程序,先试试官方的UdpSend.java能否跑起来。結果eclipse给出了如下错误提示:

 


 

Access restriction: The type JpcapCaptor is not accessible due to restriction on required library /media/sda7/opt/jdk1.6.0_16/jre/lib/
 ext/jpcap.jar

 

其实要解决它也很容易,在Window - Java - Compiler - Errors/Warnings界面的Deprecated and restricted API下。把Forbidden reference (access rules): 的规则由默认的Error改为Warning即可。