Java 运行 JRE 的 VisualVM

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24044069/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-14 09:52:12  来源:igfitidea点击:

VisualVM running JRE

javaeclipsevisualvm

提问by Peter

I can't get VisualVM working with eclipse, i was following these instructions http://visualvm.java.net/download.htmland also these http://visualvm.java.net/gettingstarted.html

我无法让 VisualVM 与 Eclipse 一起工作,我正在遵循这些说明 http://visualvm.java.net/download.html以及这些 http://visualvm.java.net/gettingstarted.html

The problem is that it cant see JDK location which is "C:\Program Files\Java\jdk1.8.0_05", this happens when i try to run the application

问题是它看不到 JDK 位置,即“C:\Program Files\Java\jdk1.8.0_05”,当我尝试运行应用程序时会发生这种情况

enter image description here

在此处输入图片说明

Here is the original content of visualvm.conf file

这里是visualvm.conf文件的原始内容

http://pastebin.com/K9TnQb0G

http://pastebin.com/K9TnQb0G

Unfortunately my command line is somehow broken too(or I'm the one who dont know how to do it)

不幸的是,我的命令行也以某种方式坏了(或者我是不知道该怎么做的人)

enter image description here

在此处输入图片说明

First I tryed to install JProbe but it wasnt working, then I tryed VisualVM and it also isn't working. How can i resolve this please? I wasted 5 hours and its driving me crazy.

首先我尝试安装 JProbe 但它不起作用,然后我尝试了 VisualVM 并且它也不起作用。请问我该如何解决?我浪费了 5 个小时,这让我发疯。

采纳答案by Reimeus

Add the JDK bin directory to the PATHenvironmental variable

将JDK bin目录添加到PATH环境变量中

PATH=C:\Program Files\Java\jdk1.8.0_05\bin;%PATH%

回答by dcsohl

Uncomment line 72 of your visualvm.conf file, and set the value:

取消注释 visualvm.conf 文件的第 72 行,并设置值:

#visualvm_jdkhome="/path/to/jdk"