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. Python - 学习经验分享

    执行方式: 直接输入python进入命令行,进行单行输入执行,退出后不保存. python filename.py或./filename.py 直接执行脚本文件 脚本格式: #!/usr/bin/py ...

  2. android onConfigurationChanged讲解

    本文来自http://blog.csdn.net/liuxian13183/ ,引用必须注明出处! 相信大家对这个属性已经耳熟能详,如果大家受过转屏的折磨的话! 老规矩,先讲讲官方文档是怎么说的.为什 ...

  3. utf8与utf-8的区别

    相信很多程序员刚开始也会有这样的疑惑,如题,我也是.    其实,他们可以这样来区分.    一.在php和html中设置编码,请尽量统一写成“UTF-8”,这才是标准写法,而utf-8只是在wind ...

  4. Java测试工具

    1.   开源测试工具: http://www.open-open.com/43.htm 2.   10款常用的JAVA测试工具 :http://developer.51cto.com/art/200 ...

  5. C中的setjmp与longjmp

    setjmp与longjmp是属于C语言中的,当然,C++也会有这两个函数了.他们的原型如下: int setjmp( jmp_buf env ); 作用:第一次调佣时,将寄存器的当前状态信息全部存入 ...

  6. URL结尾反斜杠对SEO的影响(转)

    开始纠结网站URL加不加反斜杠对SEO的影响,还有些人把这个反斜杠说的神乎其神,我擦,本人手贱百度了一下,果然“博大精深”,敬请参考! 从百度站长平台的外链分析里,我们可以看到,一些目录结构的URL, ...

  7. android studio 中怎么使用adb无线调试

    之前再eclipse下进行安卓开发,但谷歌却抛弃了eclipse而力挺android studio开发环境,没办法只好跟着走. 在eclipse下开发时调试用adb无线方式特别方便,但是在androi ...

  8. 编写postgresql函数执行循环copy命令导入大数据

    CREATE OR REPLACE FUNCTION copyData() RETURNS boolean AS $BODY$ DECLARE i int; begin i :=1; FOR i IN ...

  9. CentOS 6.2 OpenVPN 搭建

    一.yum 安装. 二.下载 easy-rsa 3.0 三.生成根证书.服务器.客户端证书.ta 生成流程: wget -c https://github.com/OpenVPN/easy-rsa/a ...

  10. ANTLR3完全参考指南读书笔记[06]

    前言 这段时间在公司忙的跟狗似的,但忙的是没多少技术含量的活儿. 终于将AST IR和tree grammar过了一遍,计划明天写完这部分的读书笔记.   内容 1 内部表示AST构建 2 树文法   ...