---
title: "Eclipse配置jconsole"
author: "anthrax2"
date: "2016-12-01T16:39:33Z"
tags: []
categories: ["Web前端"]
slug: "eclipse-jconsole"
draft: false
lastmod: "2016-12-01T16:39:33Z"
id: 2342293
url: "https://anthrax2.iteye.com/blog/2342293"
---

问题描述：
   遇到个内存泄露的问题，想用jconsole跟踪下内存消耗情况，发现一直连接不上，程序都运行完了，也没连接上，尝试了好几次都这样。
问题分析：
   Eclipse默认不开启远程JMX功能。
解决办法：
   开启JMX功能。
步骤：
   在程序启动参数中加入以下内容:<span style="color:red">
-Dcom.sun.management.jmxremote
-Dcom.sun.management.jmxremote.port=8011
-Dcom.sun.management.jmxremote.ssl=false
-Dcom.sun.management.jmxremote.authenticate=false
</span>
如下图:
![](http://dl2.iteye.com/upload/attachment/0121/6648/0f302e2e-57bc-35c6-91a8-2913b8845dd9.png)