Access restriction: The type XXX is not accessible due to restriction on required library XXX

今天新建一个类的时候,不少元素报错,说引用不到:html

 Access restriction: The type NoSuchPortException is not accessible due to restriction on required library C:\Java\jre7\lib\ext\comm.jar
java


 这个comm.jar 是在项目中后来引用的,并非java自带的,ide



那怎样解决这个引用不到的问题呢?网上搜到了答案:ui

右击项目,Build Path -> Configure Build Path,在对话框中选择 Order and Export 标签,把comm.jar的位置移动到JRE System Library 的上面3d


效果以下:rest



报错信息消失。htm

相关文章
相关标签/搜索