解决方案1(推荐):
Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning
只需要在project build path中先移除JRE System Library,再添加库JRE System Library,重新编译后就一切正常了。
解决方案2:Windows -> Preferences -> Java -> Compiler -> Errors/Warnings ->
Deprecated and trstricted API -> Forbidden reference (access rules): -> change to warning

本文提供了两种解决Java项目中出现的废弃和受限API警告的方法。第一种是在项目构建路径中调整JRE系统库的设置;第二种是通过Eclipse的偏好设置来改变错误和警告的处理方式。
2197

被折叠的 条评论
为什么被折叠?



