The type 'OperatingSystemMXBean' is not API (restriction on required library

方法一:
全局属性Project>preferences>java>Compiler>Errors/Warnings>把右侧的【Deprecated and restricted API>Forbidden reference的Error】置为【Warning】.


The type 'OperatingSystemMXBean' is not API (restriction on required library_第1张图片
图1

方法二:
项目属性preferences>java build path>把右侧【libraries中的JRE System Library】删除重新导入

你可能感兴趣的:(The type 'OperatingSystemMXBean' is not API (restriction on required library)