问题描述
我想使用java VisualVM来监控我的JAVA APP的性能,但是Java VisualVM无法获取eclipse的java任务的详细数据。我该怎么办呢?有人知道吗?
I want to use java VisualVM to monitor the performance of my JAVA APP, but Java VisualVM can not get the detail data of the java task of eclipse. what should I do for this? is any one know?
推荐答案
确保在Eclipse的vmargs中有 -Dcom.sun.management.jmxremote
。
Make sure you have -Dcom.sun.management.jmxremote
in the vmargs of Eclipse.
您可以查看是否在此对话框中查找:帮助 - >关于 - >安装详细信息 - >配置。
You can find out whether you have looking in this dialog: Help -> About -> Installation Details -> Configuration.
eclipse.vmargs = ...
显示为Java VM传递的所有参数。
eclipse.vmargs=...
shows all the arguments which were passed for the Java VM.
如果缺少此选项,则打开 eclipse.ini
并搜索 -vmargs 。如果它不存在,请在最后添加:
If this option is missing, then open
eclipse.ini
and search for the line -vmargs
. If it's not there, add it at the end:
-vmargs
-Dcom.sun.management.jmxremote
请注意,这些选项中的每一个都应该在不同的行上。
Note that each of these options should go on a different line.
确保
-vmargs
是文件中的最后一个Eclipse选项;下面的所有内容将被组合成一个VM的参数数组,并被Eclipse忽略。
Make sure that
-vmargs
is the last Eclipse option in the file; everything below will be assembled into an array of arguments to the VM and ignored by Eclipse.
这篇关于java visual VM如何获得与eclipse java任务的连接的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!