JFrame受限制,因为对所需库的限制 [英] JFrame Restricted due to restriction on required library
本文介绍了JFrame受限制,因为对所需库的限制的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在eclipse中创建一个新的Java项目.唯一的问题是,在出现如下错误信息之前,我什至没有得到5行信息:
I am making a new Java project in eclipse. The only problem is that I didn't even get five lines in before I got an error that reads:
Access Restriction: The type JFrame is not accessible due to restriction on
required library C:\Program Files\Java\jre8\lib\rt.jar
如何解决此问题?如果有人已经问过类似的问题,请原谅我.我还是一个初学者.
How do I fix this issue? Please forgive me if someone already asked a similar question. I am still a beginner.
推荐答案
尝试删除Java系统库并将其读取到您的项目中:
Try removing and readding the Java System Library to your project:
项目属性->构建路径->库->删除,然后添加库-> JRE系统库
Project Properties -> Build Path -> Libraries -> Remove , and then Add Library -> JRE System Library
在删除库后尝试关闭并重新打开对话框
Try closing and reopening the Dialog after removing the the Library
这篇关于JFrame受限制,因为对所需库的限制的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文