user10623291 wrote:I might have tried it myself if I had a 64 bit linux install.
Btw. I'm not really asking anybody to wrestle with my piece of code and try to reproduce the problem for me if they don't feel like doing it. Rather, looking at this from my own perspective, such small, concise, easy testcases like this one make for fun puzzles and for lack of a better phrase, intellectual feats.
If that's the case then we'll have nothing but to go through the application and trim the stack usage.Myself that would seem like a good idea regardless. I would wonder at why it was done like that in the first place.
EJP wrote:As I read the first link posted by the user it seems to specifically say that there is no way on linux to get around that.we'll have nothing but to go through the application and trim the stack usageUntrue. Just change your main() method to start another thread, that does what the main() method used to do.
user10623291 wrote:If it is an OS limit then you can ditch the JNI test entirely.
Thanks for the new thread idea, a simple test shows that it might work. A new thread created after creating the JVM seems to have as much stack as indicated by ulimit -s.