Hi,
I have a problem creatin a JVM from C++ code using the JNI_CreateJavaVM method.
I tried to write a code that creates the vm with a certain -Xmx value, and if it fails I want to try create the VM again with lower -Xmx value.
The problem is that when I try to create the VM with -Xmx800m value from the first place it succeeds. But if I try to create it with -Xmx800m after a previous failure it fails, specifically:
I tried to create it with -Xmx1700M and failed on a heap size problem (As expected), right after that failure I change the -Xmx parameter to -Xmx800 (Which is expected to succeed) and try to create it again - And here I get a failure again (Just a failure, no indication on heap size problem).
I don't know what the problem is, I suspect it has something to do with cleanups after the first failure, but I could not get it to work.
Any one have a solution?
I have a problem creatin a JVM from C++ code using the JNI_CreateJavaVM method.
I tried to write a code that creates the vm with a certain -Xmx value, and if it fails I want to try create the VM again with lower -Xmx value.
The problem is that when I try to create the VM with -Xmx800m value from the first place it succeeds. But if I try to create it with -Xmx800m after a previous failure it fails, specifically:
I tried to create it with -Xmx1700M and failed on a heap size problem (As expected), right after that failure I change the -Xmx parameter to -Xmx800 (Which is expected to succeed) and try to create it again - And here I get a failure again (Just a failure, no indication on heap size problem).
I don't know what the problem is, I suspect it has something to do with cleanups after the first failure, but I could not get it to work.
Any one have a solution?