File creation for dump changed

This commit is contained in:
Marcos Lopez Gonzalez 2018-09-17 18:13:09 +02:00
parent f83b1268cc
commit a48f385176
1 changed files with 3 additions and 1 deletions

View File

@ -3,8 +3,10 @@ package com.baeldung.heapdump;
import com.sun.management.HotSpotDiagnosticMXBean;
import javax.management.MBeanServer;
import java.io.IOException;
import java.lang.management.ManagementFactory;
import java.nio.file.Paths;
public class HeapDump {
@ -16,7 +18,7 @@ public class HeapDump {
}
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);
}