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. squid 延伸

    #openssl req -new -x509 -days 365 -nodes -out stunnel.pem -keyout stunnel.pem # openssl gendh 512> ...

  2. Android开发指南-框架主题-安全和许可

    概述:Android操作系统是一个安全便捷的Linux系统,遵循Linux系统机制,允许多进程.为了进程间的数据共享和交互共用,设计"权限"这个名词,声明权限代表可使用此权限,未声 ...

  3. session 和 cookie 的区别和联系

    二者的定义: 当你在浏览网站的时候,WEB 服务器会先送一小小资料放在你的计算机上,Cookie 会帮你在网站上所打的文字或是一些选择,都纪录下来.当下次你再光临同一个网站,WEB 服务器会先看看有没 ...

  4. [转载]Magento 店铺多语言设置

    本文以扩展中文包为例: 首先进入自己 Magento 后台 系统 -> 管理商店(System -> Manage Stores) 单击 “创建店铺视图”(Create Store Vie ...

  5. 关于python的一些笔记

    Python源文件默认以UTF-8编码.在这种编码下,世界上大多数语言的字符可以在字符串,标识符和注释中同时使用 — 尽管标准库中的标识符只使用ASCII字符,它是可移植代码应该遵循的一个惯例.为了能 ...

  6. PAT (Basic Level) Practise:1001. 害死人不偿命的(3n+1)猜想

    [题目链接] 卡拉兹(Callatz)猜想: 对任何一个自然数n,如果它是偶数,那么把它砍掉一半:如果它是奇数,那么把(3n+1)砍掉一半.这样一直反复砍下去,最后一定在某一步得到n=1.卡拉兹在19 ...

  7. win7建立无线wifi热点的几个常见的问题

    命令行开启WiFi方法: 开启WiFi.bat netsh wlan set hostednetwork mode=allow netsh wlan set hostednetwork ssid=ss ...

  8. ZOJ Problem Set - 3640 Help Me Escape

    题目大意: 有n条路,选每条路的概率相等,初始能力值为f,每条路通过的难度值为ci,当能力值大于某条路A的难度值b时,能够成功逃离,花费时间ti,小于等于时,不能逃离,天数加一天,但能力值增加b. 给 ...

  9. 希尔排序(C++版)

    #include <iostream> using namespace std; /** Shell Sort * * Key: * * increment * * insertSort( ...

  10. Notes of Principles of Parallel Programming: Peril-L Notation - TODO

    Content 1 syntax and semantic 2 example set 1 syntax and semantic 1.1 extending C Peril-L notation s ...