`
hehaibo
  • 浏览: 411719 次
  • 性别: Icon_minigender_1
  • 来自: 长沙
社区版块
存档分类
最新评论

eclipse开发工具 -Access restriction 编译错误

阅读更多

Access restriction: The type Unsafe is not accessible due to restriction on required library D:\dev\Java\jdk1.6.0_31\jre\lib  \rt.jar

 

问题原因:Eclipse 默认把这些受访问限制的API设成了ERROR。

解决办法:将 Windows->Preferences->Java-Complicer->Errors/Warnings->Deprecated and restricted API,中的Forbidden references(access rules)设置为Warning,即可以编译通过。

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics