[英]Access restriction on library Java library
I am new to programming and trying to create a window in java with eclipse and got this error message at runtime. 我是编程和尝试在Java中使用eclipse创建窗口的新手,并且在运行时收到此错误消息。
How do I fix this error or allow access to the Library? 如何解决此错误或允许访问库?
Exception in thread "main" java.lang.Error: Unresolved compilation problems:
Access restriction: The type JFrame is not accessible due to restriction on required library C:\Program Files\Java\jre1.8.0_25\lib\rt.jar
Your help would be greatly appreciated. 您的帮助将不胜感激。
I removed and re-added JRE System Library and it worked for me. 我删除并重新添加了JRE系统库,它对我有用。
For this task navigation is: Select Project -> BuildPath -> Libraries 对于此任务,导航为:选择项目-> BuildPath->库。
For Eclipse, steps are: 对于Eclipse,步骤如下:
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.