A problem creating Java VM using JNI_CreateJavaVM

Joined
May 12, 2007
Messages
1
Reaction score
0
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?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,482
Members
44,901
Latest member
Noble71S45

Latest Threads

Top