ManagementFactory cannot be resolved

问题描述:

(1)ManagementFactory cannot be resolved

or

(2)Type The type sun.management.ManagementFactory is not visible

or

(3)java.lang.NoClassDefFoundError: sun.management.ManagementFactory

 

这个功能用了Java5、6中sun建议不使用,以后版本中可能会移除的一些类库。现在果然撞到枪口上,在java7中移除了。所以那个功能就不正常了。

 

解决方法:

把sun.management.ManagementFactory替换成java.lang.management.ManagementFactory

jdk1.7没有sun.management.ManagementFactory这个对象

相关文章:

  • 2022-12-23
  • 2021-08-27
  • 2021-11-14
  • 2021-10-19
  • 2022-12-23
  • 2021-08-08
  • 2021-05-06
  • 2021-12-16
猜你喜欢
  • 2021-10-28
  • 2021-12-13
  • 2021-06-14
  • 2021-07-14
  • 2022-12-23
相关资源
相似解决方案