3

I created a simple console application that I run from Eclipse (right clicking on the file and selecting run as Java application.) I stuck a sleep in there so I can ensure that the process is still running when I start the Aquire Heap Dump Dialog. I start the dialog, hit refresh, and there are no local processes listed.

I checked Eclipse's error log and it only reports that it had problems listing the IBM VM processes (the HPROF one is configured and working fine.)

What am I doing wrong?

4

2 回答 2

3

为什么不从您的程序代码创建堆转储?

https://blogs.oracle.com/sundararajan/entry/programmatically_dumping_heap_from_java

或者当从这里遇到安全问题时: 从应用程序内创建堆转储,没有 HotSpotDiagnosticMXBean

我用它在我的 JUnit 测试中进行固定次数的迭代后进行堆转储,剩下要做的就是在 Eclipse MAT 中打开转储并找到内存泄漏的原因:-(

于 2012-12-19T17:04:08.087 回答
0

I faced same issue and after googled I found this solution.

Specify jdk path in "Acquire Head Dump" -> "Configure..." -> Select "HPROF jmap dump provider" -> "-jdkhome" -> speficy jdk path by default it should be "C:\Program Files\Java\jdk1.8.0_102" or your jdk location.

I hope it works for you.

于 2017-03-16T20:56:22.797 回答