使用eclipse开发工具在需要JFrame时, 提示无法解析继承的类名,提示
error:
Access restriction: The type JFrame is not accessible due to restriction on required library D:\java2sdk\jre\lib\rt.jar
at com.hao123.HisJFrame.main(HisJFrame.java:13)
Exception in thread "main"
解决方法:
Project -> Properties -> libraries, 先remove掉JRE System Library,然后再Add Library重新加入D:\java2sdk\jre\lib【我安装java目录】下面的 .jar 包。