从eclipse运行Visual VM [英] Running Visual VM from eclipse
问题描述
我试图在Eclipse开普勒中使用Visual VM调试一个java应用程序。我正在执行该类,主要方法选择Visual VM作为启动器。我已按照中给出的说明配置Visual VM http://blog.idrsolutions.com/2013/05/setting-up-visualvm-in-under-5-minutes 。我收到以下错误:
I am trying to debug a java app using Visual VM in Eclipse kepler. I am executing the class having main method selecting Visual VM as launcher. I have configured Visual VM as per the instructions given in http://blog.idrsolutions.com/2013/05/setting-up-visualvm-in-under-5-minutes. I am getting the following error:
An internal error occurred during: "Launching TestNew".
java.lang.NullPointerException
TestNew是具有main方法的类的名称我正在尝试执行。
"TestNew" is the name of the class with main method I am trying to execute.
请帮助。
推荐答案
有同样的问题...让我展开Anushree的评论:
I had the same issue... Let me expand a bit on Anushree's comment:
- 转到 窗口 ⇒ 首选项 ⇒ 运行/调试 ⇒ 启动 ⇒ JDK的bin目录
- 确保将JDK的根目录设置为 JDK Home EM> 即可。如果你离开指向你的JRE目录,你会遇到下一个错误...
- Go to Window ⇒ Preferences ⇒ Run/Debug ⇒ Launching ⇒ VisualVM Configuration
- Browse... for the VisualVM Executable in your JDK's bin-directory
- Make sure to also set the JDK's root directory under JDK Home. If you leave that pointing to your JRE directory, you'll run into the next error...
快乐的分析...
BTW:如果您在JVisualVM中显示应用程序时出现问题,请查看:
在Eclipse中运行Java程序以显示在VisualVM中
BTW: If you then have issues getting your application to show up inside jVisualVM, take a look here: Getting Java program running in Eclipse to show up in VisualVM
这篇关于从eclipse运行Visual VM的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!