I have a program that should eventually generate OutOfMemory
.
The program code is:
public class VeryLargeObject implements Serializable {
p
The problem is that -XX:HeapDumpPath
spefies a file and not a path.
-Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="c:\temp\dump2.hprof"
added:
and bestsss is right too, so you need to fix both "errors":
java -Xms1024m -Xmx1024m -XX:+HeapDumpOnOutOfMemoryError -XX:HeapDumpPath="c:\temp\dump2.hprof" VeryLargeObject