错误

Access restriction: The type JFrame is not accessible due to restriction on required library C:\Program Files\Java\jre7\lib\rt.jar
解决方法
和安装路径没关系。
在eclipse或myeclipse下,选择你的项目-右键属性-找到java build path-右侧找到libraries
看到下面有JRE System Libriry,这里是你当前JVM下运行环境需要的jar包。
你上述的路径
C:\Program Files\Java\jre7\lib\rt.jar
包也在其中
在Jre System Library下有个Access rules,双击打开,这里默认访问规则,上面下拉框改为accessible,下面填**即可
不知道原因