ManagementFactory cannot be resolved
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的更多相关文章
- java 利用ManagementFactory获取jvm,os的一些信息--转
原文地址:http://blog.csdn.net/dream_broken/article/details/49759043 想了解下某个Java项目的运行时jvm的情况,可以使用一些监控工具,比如 ...
- 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 ...
- 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 双击启动失败, ...
- Git异常:fatal: V1.0 cannot be resolved to branch.
GitHub实战系列汇总:http://www.cnblogs.com/dunitian/p/5038719.html ———————————————————————————————————————— ...
- java监控之ManagementFactory分析
The ManagementFactory class is a factory class for getting managed beans for the Java platform. This ...
- 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 ...
- <<< java异常The import java.util cannot be resolved
异常:The import java.util cannot be resolved 原因:这是由于你的项目buildpath不对 解决方案:右键项目-------buildpath--------最 ...
- Andrion错误解决:cannot be resolved or is not a field
cannot be resolved or is not a field 解决这个问题: 选择project菜单中的clean,选择你的项目,先clean一下, 再去看看Activity中有没 ...
- ImageView cannot be resolved to a type
问题: ImageView cannot be resolved to a type 报这样的错误是没有加载MainActivity.java文件中加入 import android.widget.I ...
随机推荐
- arcgis显示其他国家语言
接手一个韩国的项目,需要在arcmap中配置一个韩国地图并发布到arcserver中进行切图,给的韩国地图的shapefile文件中属性字段都是韩文的,在中文的系统中,arcMap中显示的韩文都是乱码 ...
- HDU 1054
http://acm.hdu.edu.cn/showproblem.php?pid=1054 二分图最少顶点覆盖,模板题,双向边最后结果/2 #include <iostream> #in ...
- static 静态代码块 动态代码块 单例
1. 共享,不属于对象,属于类,类成员变量,任何一个类的对象都有该属性,一旦被修改,则其他对象中的该属性也被更改. 2. 类中方法是static的,可以通过类名直接访问,不用new一个该类的对象. 3 ...
- nginx的upstream目前支持5种方式的分配(转)
nginx的upstream目前支持5种方式的分配 1.轮询(默认) 每个请求按时间顺序逐一分配到不同的后端服务器,如果后端服务器down掉,能自动剔除. 2.weight 指定轮询几率,weight ...
- ReentrantLock获取锁方式解读(转)
原文地址:http://www.zhihu.com/question/36771163 (一) lock()方法获取锁.如果该锁没有被另一个线程保持,则获取该锁并立即返回,将锁的保持计数设置为 1.如 ...
- log4j 应用
前言: 该片文章旨在对于刚入门的log4j学习的同学们,看完这篇,应该可以提高了. 主要内容还是根据log4j的配置文件中的各个配置来进行解析 正文: log4j 使用参数 log4j配置文件示例: ...
- Sublime text2如何设置快捷键让编写的HTML文件在浏览器预览?
著作权归作者所有.商业转载请联系作者获得授权,非商业转载请注明出处.作者:浪人链接:http://www.zhihu.com/question/27219231/answer/43608776来源:知 ...
- hdu 4248 A Famous Stone Collector
首先发现一个很头痛的问题,下面是2个求排列组合的代码 memset(C,,sizeof(C)); ;i<;i++) { C[i][]=; ;j<=;j++) C[i][j]=(C[i-][ ...
- ZSDR100 跑原材料MRP
*&---------------------------------------------------------------------**& Report ZSDR100*&a ...
- 用java将excel表格中的内容修改后写入到另一个excel中
package nn; import java.io.File; import jxl.Cell; import jxl.Sheet; import jxl.Workbook; import jxl. ...