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 ...
随机推荐
- 【转】 Understanding Component-Entity-Systems
http://www.gamedev.net/page/resources/_/technical/game-programming/understanding-component-entity-sy ...
- [sql server发布订阅]after触发器执行失败造成复制不成功
结论: (以插入而例) 发布端的数据插入成功 订阅段的数据不会插入 实验 创建一张新表 create table test_subscriber (id int, mark varchar(2),in ...
- Munin监控的安装与配置
Munin 是一款类似 RRD tool 的优秀系统监控工具,它能提供给你多方面的系统性能信息,例如 磁盘.网络.进程.系统和用户. Munin 的工作原理 Munin 以客户端-服务器模式运行,主服 ...
- JavaScript 编写多线程代码引用Concurrent.Thread.js(转)
这是一个很简单的功能实现: <script type="text/javascript" src="Concurrent.Thread.js">&l ...
- Spring中MultipartHttpServletRequest实现文件上传 生成缩略图
转贴自:http://my.oschina.net/nyniuch/blog/185266 实现图片上传 用户必须能够上传图片,因此需要文件上传的功能.比较常见的文件上传组件有Commons Fil ...
- JavaScript学习记录总结(九)——移动添加效果
<!DOCTYPE html><html><head><title>moveOption.html</title> <meta nam ...
- Codeforces Round #128 (Div. 2)
A. Two Problems 分两题的过题情况讨论,并且数值均不大,暴力枚举. B. Game on Paper 每次给格子染色后,考虑当前格子在正方形中的位置,然后判断对应的正方形是否都已染色. ...
- spark优化之优化数据结构
概序: 要减少内存的消耗,除了使用高效的序列化类库以外,还有一个很重要的事情,就是优化数据结构.从而避免Java语法特性中所导致的额外内存的开销,比如基于指针的Java数据结构,以及包装类型. 有一个 ...
- Android——进度对话框
java类代码: //普通进度对话框 public void bt8_onClick(View v) { final ProgressDialog progressDialog = new Progr ...
- Linux驱动设计——并发与竞态控制
并发的概念:多个执行单元同时.并行被执行. 共享资源:硬件资源(IO/外设等),软件上的全局变量.静态变量等. 四种并发控制机制(对共享资源互斥的访问):原子操作.自旋锁(spinlock).信号量( ...