Changing the stack size
My program requires 664579 levels of recursion, but I get StackOverflow error. I read that I can change the stack size with the command line prompt: "java -Xss1024k". However, it seems that, at least with Java SE 1.6, it is also necessary to enter the class as well, like "java -Xss1024k myProgram"
Unfortunately, I am unsure of how to write the path reference to my class. That is, I don't know what to put in place of "myProgram".
Well, stack size configuration or no stack size configuration, you always have to specify the class name that you want to run. How else were you running your program before...??? So for example, you might write:
java <options> -cp . com.mypackage.MyMainClass
where <options> can be whatever you want-- stack size setting etc. You would generally end up specifying "cp ." to mean "set the class path to be the current directory".
However, there may be a preferable option in any case. You can set the stack size in the Thread constructor, i.e. within your Java program rather than in the command line options.