File creation for dump changed
This commit is contained in:
parent
f83b1268cc
commit
a48f385176
|
@ -3,8 +3,10 @@ package com.baeldung.heapdump;
|
||||||
import com.sun.management.HotSpotDiagnosticMXBean;
|
import com.sun.management.HotSpotDiagnosticMXBean;
|
||||||
|
|
||||||
import javax.management.MBeanServer;
|
import javax.management.MBeanServer;
|
||||||
|
|
||||||
import java.io.IOException;
|
import java.io.IOException;
|
||||||
import java.lang.management.ManagementFactory;
|
import java.lang.management.ManagementFactory;
|
||||||
|
import java.nio.file.Paths;
|
||||||
|
|
||||||
public class HeapDump {
|
public class HeapDump {
|
||||||
|
|
||||||
|
@ -16,7 +18,7 @@ public class HeapDump {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) throws IOException {
|
public static void main(String[] args) throws IOException {
|
||||||
final String file = "/tmp/dump.hprof";
|
String file = Paths.get("dump.hprof").toFile().getPath();
|
||||||
|
|
||||||
dumpHeap(file, true);
|
dumpHeap(file, true);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue