I just want to control the stack size for all of my threads in a Java (groovy) application. For the Hotspot Oracle VM, I know that there are two parameters doing that (-Xss and
-Xss
works only on main
Java thead, but -XX:ThreadStackSize
works on all Java thread.
If -Xss (or -ss) were passed on the command line, it gets picked up directly by the launcher and is used later to create the "main" Java thread, without asking the VM for the preferred thread stack size. That where inconsistency comes from: if -Xss is given after -XX:ThreadStackSize, then things are still good; otherwise, the "main" Java thread would have a stack size specified by -Xss where as other Java threads' stack size would still follow that of ThreadStackSize.
Inconsistency between -Xss and -XX:ThreadStackSize in the java launcher