eclipse中出现The con“structor 'NimbusLookAndFeel()' is not API ”的解决办法

在eclipse中,有时会出现如下的错误:
这里写图片描述
这里写图片描述
它提示的错误信息是这样子的:
Access restriction: The constructor ‘NimbusLookAndFeel()’ is not API (restriction on required library ‘D:\java66\jre\lib\rt.jar’)
然后我的解决办法就是:
把Windows-Preferences-Java-Complicer- Errors/Warnings里面的Deprecated and restricted API中的Forbidden references(access rules)选为Warning就可以编译通过。
在此附上图片:
这里写图片描述
这里写图片描述
这里写图片描述

猜你喜欢

转载自blog.csdn.net/tyg88888/article/details/70163196