使用myeclipse开发java,解决java中继承JFrame类出现The type JFrame is not accessible due to restriction的问题

在java中创建窗体,导入了java中的JFrame类,之后会出现错误:

Access restriction: The type QName is not accessible due to restriction on required library D:\myeclipse professer2014

可以解决的办法为:

Project—>Properties—>选中Java Build Path—>选择Libraries,出现下面界面:

 

 

 

选中窗口中原有的JRE库,点击Remove,之后再选择Add Libraries,出现下图:
再选中蓝色部分的选项,JRE System Libraries,点next,在finish。完成所有操作之后重启myeclipse就可以了。
posted @ 2015-05-20 19:11  sunny_2015  阅读(1459)  评论(0编辑  收藏  举报