---
title: "使用jconsole：出现 “is not a managed VM.”"
author: "tanleihaoren"
date: "2008-09-16T17:03:39Z"
tags: []
slug: "jconsole-is-not-a-managed-vm"
draft: false
lastmod: "2008-09-16T17:03:39Z"
id: 242815
url: "https://chengdu.iteye.com/blog/242815"
---

想试试jconsole来profile一下我的代码，结果使用jconsole &lt;pid&gt;时，I get the following error message: "&lt;pid&gt; is not a managed VM." (另一种表现是：本地标签处没有显示任何可用PID)，原来是我没有开启一个JVM options。解决方法(我的web是部署在Jboss中)：

 

  Eclipse中--&gt;window--&gt;Preference--&gt;myeclipse--&gt;Servers--&gt;Jboss4--&gt;JDK--&gt;Optional JVM arguments

 

填写"-Dcom.sun.management.jmxremote",嘻嘻,就可以了