Hello,
here my actual code after your corrections:
....
JavaVMOption options[1];
options[1].optionString = "-Djava.class.path=.";
JavaVMInitArgs args;
args.version = JNI_VERSION_1_4;
args.nOptions =2;
args.options = options;
args.ignoreUnrecognized = JNI_TRUE;
jsize maxNoOfVMs = 1;
jsize actualNoOfVMs;
response = JNI_GetCreatedJavaVMs(&mJvm, maxNoOfVMs, &actualNoOfVMs);
if (JNI_OK == response && 0 == actualNoOfVMs)
response = JNI_CreateJavaVM(&mJvm, (void**)&mEnv, &args);
....
I get still -1. I could debug in the meantime
depper and I see that the problem is in the 'unlock'
method. It is coming originally from 'HeapAlloc'
method of 'malloc.c' file. Shoud I set the heap size?
Have you any idea?
Thanks,
Anahita