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. Object-C 基础笔记3---属性

    一,区别属性和实例变量 实例变量就是声明在接口大括号里面的变量.@public类型的实例变量直接使用->访问, property 属性是一组设置器和访问器,属性是方法不是变量. 与类相似,属性需 ...

  2. The Cow Lineup_找规律

    Description Farmer John's N cows (1 <= N <= 100,000) are lined up in a row.Each cow is labeled ...

  3. Http权威指南(二)---读书笔记

    Chart4 ====连接管理==== 一.TCP连接 1.  Http和Https的网络协议栈: 2.  Http在TCP/IP传输中的位置:   3.  Http怎么利用TCP传输: 二.Http ...

  4. linux监控nmon和analyser的使用

    测试压力的时候使用linux一个简单的监控工具nmon,不仅可以实时监测,也可以生成文件以图标样式展现,小巧实用 安装nmon nmon实际上是个tarball直接解压到所要放置的目录,然后直接运行就 ...

  5. css 属性积累

    1. letter-spacing:6px;    //属性增加或减少字符间的空白(字符间距) 2. cursor                       // 鼠标移上去的鼠标状态 属性值有: ...

  6. My97DatePickerBeta 时间选择控件用法

    用法说明:只需要调用一个js<script language="javascript" type="text/javascript" src=" ...

  7. Codeforces Round #117 (Div. 2)

    Codeforces Round #117 (Div. 2) 代码 Codeforces Round #117 (Div. 2) A. Battlefield any trench in meters ...

  8. POJ 1321 棋盘问题 --- DFS

    POJ 1321 题目大意:给定一棋盘,在其棋盘区域放置棋子,需保证每行每列都只有一颗棋子. (注意 .不可放 #可放) 解题思路:利用DFS,从第一行开始依次往下遍历,列是否已经放置棋子用一个数组标 ...

  9. Android——ListView相关作业(修改版)

    给GridView提供点击按钮添加新数据,单击项目修改,长按删除功能 activity_practise7的layout文件: <?xml version="1.0" enc ...

  10. 黑马程序员——JAVA基础之set集合

    ------- android培训.java培训.期待与您交流! ---------- Set:       元素是无序(存入和取出的顺序不一定一致),元素不可以重复.    Set接口中常用的类: ...