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这个对象

ManagementFactory cannot be resolved的更多相关文章

  1. java 利用ManagementFactory获取jvm,os的一些信息--转

    原文地址:http://blog.csdn.net/dream_broken/article/details/49759043 想了解下某个Java项目的运行时jvm的情况,可以使用一些监控工具,比如 ...

  2. The type javax.ws.rs.core.MediaType cannot be resolved. It is indirectly referenced from required .class files

    看到了http://stackoverflow.com/questions/5547162/eclipse-error-indirectly-referenced-from-required-clas ...

  3. myeclipse 无法启动 java.lang.IllegalStateException: Unable to acquire application service. Ensure that the org.eclipse.core.runtime bundle is resolved and started (see config.ini).

    把myeclipse10 按照目录完整拷贝到了另外一台电脑, 另外的目录 原安装目录 D\:\soft\i\myeclipse10 新安装目录 E\:\soft\myeclipse10 双击启动失败, ...

  4. Git异常:fatal: V1.0 cannot be resolved to branch.

    GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ———————————————————————————————————————— ...

  5. java监控之ManagementFactory分析

    The ManagementFactory class is a factory class for getting managed beans for the Java platform. This ...

  6. composer 报错:Your requirements could not be resolved to an installable set of packages 解决方法

    composer 报错: - Your requirements could not be resolved to an installable set of packages xxxxxxxxxxx ...

  7. <<< java异常The import java.util cannot be resolved

    异常:The import java.util cannot be resolved 原因:这是由于你的项目buildpath不对 解决方案:右键项目-------buildpath--------最 ...

  8. Andrion错误解决:cannot be resolved or is not a field

    cannot be resolved or is not a field   解决这个问题:   选择project菜单中的clean,选择你的项目,先clean一下, 再去看看Activity中有没 ...

  9. ImageView cannot be resolved to a type

    问题: ImageView cannot be resolved to a type 报这样的错误是没有加载MainActivity.java文件中加入 import android.widget.I ...

随机推荐

  1. PHP 防范IP攻击

    <?php //查询禁止IP $ip =$_SERVER['REMOTE_ADDR']; $fileht=".htaccess2"; if(!file_exists($fil ...

  2. 怎样将某一类型标识为适合绑定到 System.Web.UI.WebControls.ObjectDataSource 对象的对象

    1.页面的代码如下: body> <form id="form1" runat="server"> <div> </div& ...

  3. magento中比较好的博客

    magento web-开发   http://www.magentofront-end.com/magentomuban/category/web-frontend 水水博客专栏   http:// ...

  4. magento二次开发的基本步骤分享

    Magento后台添加新模块的体会 确定命名空间(Namespace)和模块(Modulename)的命名: 在app/etc/modules/ 路径下,创建 Namespace_Modulename ...

  5. 解决两台虚拟机互ping可通,但connect失败

    问题描述: 在UNP一书中实例中,采用两台不同的虚拟机.即一台虚拟机作为服务端,另外一台虚拟机作为客户端. 现象: 两台电脑各自互ping可通 客户端访问local可行 客户机访问服务端报错:No r ...

  6. ZPPR016-在制品清单报表

    *&---------------------------------------------------------------------**& Report ZPPR016*&a ...

  7. 116. Populating Next Right Pointers in Each Node

    Given a binary tree struct TreeLinkNode { TreeLinkNode *left; TreeLinkNode *right; TreeLinkNode *nex ...

  8. tyvj 1049 最长不下降子序列 n^2/nlogn

    P1049 最长不下降子序列 时间: 1000ms / 空间: 131072KiB / Java类名: Main 描述 求最长不下降子序列的长度 输入格式 第一行为n,表示n个数第二行n个数 输出格式 ...

  9. 用CSS变形创建圆形导航

    http://www.w3cplus.com/css3/building-a-circular-navigation-with-css-transforms.html 本文由陈毅根据SARA SOUE ...

  10. javabean实现serializable有什么用?为什么数据库持久就Bean实现这个接口?

    Java的"对象序列化"能让你将一个实现了Serializable接口的对象转换成一组byte,这样日后要用这个对象时候,你就能把这些byte数据恢复出来,并据此重新构建那个对象了 ...