0
私の状況をダンプ:Javaヒープでプログラム的に
- のJava 1.3または1.8
- のWindows CEまたはWindows Mobile
- PDA、いないデスクトップは使用できません
- jmap.exe
プログラムでヒープ・ダンプを取得するには、クラスcom.ibm.jvm.Dumpが必要ですが、通常はこのクラスは使用できないため、ClassNotFoundExceptionを受け取ります。
// Has to be run like this:
// cmd> javaPath -Xdump -Xmn5m -jar myJarPath
Class dump = Class.forName("com.ibm.jvm.Dump");
dump.getMethod("JavaDump", new Class[] {}).invoke(null, null);
dump.getMethod("HeapDump", new Class[] {}).invoke(null, null);
dump.getMethod("SystemDump", new Class[] {}).invoke(null, null);
// On some devices may occur ClassNotFoundException com.ibm.jvm.Dump
// or is missing j9dmp24 (but I don't understand this as all DLLs are in the device)
// do not forget to add parameter -Xdump when you are running your app. This parameter should probably be the 1st.
// I had error UTE437: Unable to load formatStrings for j9mm .. So I had to add parameter -Xmn5m
- はすべて異なるJavasに、プログラムでヒープ・ダンプを作成する方法がより多くの方法はありますか? ...ユーザーがメニューをクリックすると、ダンプを作成する必要があります。
- ヒープダンプを取得するための独自の汎用アルゴリズムを作成できますか?
これを試す:https://blogs.oracle.com/sundararajan/entry/programmatically_dumping_heap_from_java –