Eclipse报错 due to restriction on required library C:/Java/jdk1.7.51/jre/lib/rt.jar 解决方案

Eclipse报错 due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 解决方案

Eclipse 编译时报错:  

Access restriction:The type NEW is not accessible due to restriction on required library C:/Java/jdk1.6.0_10/jre/lib/rt.jar 

解决方法如下: 
1、进入Project --> Properties --> Java Build Path --> Libraries

2、remove 掉 JRE System Library

3、Add Library 重新加入JRE System Library

添加后即可解决此问题。

你可能感兴趣的:(eclipse)