I wanted to know just like we have -XSS to limit the stack size, why do we not see any option to limit the number of threads from the JVM (or that I do not know of). I do know that it can be limited from within the application logic using executors and thread pools. But anything from the JVM side or at least to limit overall Physical Memory (Not Heaps and native buffer)
As indicated I KNOW it can be done through the code and that to my my knowledge there are no switches to limit threads. My question is not "WHY" but "CAN" it be done?