問題描述
Eclipse 內存分析器:無法附加到 32 位進程 (Eclipse Memory Analyzer: Unable to attach to 32‑bit process)
當嘗試使用 Java Memory Analayzer 獲取我的 eclispe rcp 應用程序的 Heapdump 時,我收到以下錯誤消息:
Error creating heap dump. jmap exit code = 1
4120: Unable to attach to 32‑bit process running under WOW64
The ‑F option can be used when the target process is not responding
OS: 64bit Windows7
Java Memory Analyzer: 64bit
應用程序:32 位
我嘗試了 32 位和 64 位的變體,得到了同樣的錯誤。
oemone 能告訴我問題是什麼嗎?
p>參考解法
方法 1:
This means that the jmap you are using is the one that is bundled with the 64 bit version of the JDK. If you are using this jmap to acquire a heap dump from a 32 bit JVM, then this error pops up.
Solution : Use the version of jmap that is bundled with the 32 bit JDK.
方法 2:
Let's say you have Java 64 bit version(so is for Java tools like jvisualvm and jstack) and the IDE/path, where ever you run javac command have java 32 bit in class path, then you will see such issues. if you try to analyze this process from
1)java VisualVM, then it may not load your process properly, means you will not able to take thread/heap dumps for problematic process.
2) from jstack , then also it will create same problem like you mentioned above.
To solve the issue,make sure that everything is matched in the version.
(by Markus、suhridk、vishnuprasad)