Running Visual VM from eclipse

故事扮演 提交于 2019-12-10 01:06:53

问题


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” is the name of the class with main method I am trying to execute.

please help.


回答1:


I had the same issue... Let me expand a bit on Anushree's comment:

  • Go to WindowPreferencesRun/DebugLaunchingVisualVM 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...

Happy profiling...

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



来源:https://stackoverflow.com/questions/25805204/running-visual-vm-from-eclipse

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!