|
Answer» I'm writing a PROGRAM that creates a two dimensional ARRAY of x by y sizes. At large numbers for both x and y (5000 for example), the program crashes and has a OutOfMemoryError: Java Heap Size. I don't remember the exact error, but that's very close.
My question is: How do I tell the program to increase the application's heap size upon starting without forcing command LINE input. ie: is there a line of code to increase the heap size before anything else executes inside the java program.
As a sidenote, my program is run from/in the console, if that makes any difference.
I have a vague knowledge of -Xmx and -Xmn but as far as I know, those are a system setting that has to be SET by the user at runtime via the command line.
Thanks for any help. -rock
|