import sun.management.ManagementFactory,我在rt包下已经找到sun.management.ManagementFactory,但是就是有才错,请问怎么回事。

解决方案 »

  1.   

    Access restriction: The type ManagementFactory is not accessible due to restriction on required library D:\cdmInstall\glassfish3\jdk\jre\lib\rt.jar访问限制: 不让访问rt.jar里面的
      

  2.   

    Eclipse默认将这些受访问限制的API设成了Error。
    解决方法:
    只要将Windows---Preferences---Java--Complicer---Errors/Warings里面的Deprecated and restricted API中的Forbidden references(access rules) 选为Waring就可以编译过了