I am trying to access some
java classes, from Visual C++ 6.0, using JNI. The program compiles and links fine, but when I run it, in the JNI_CreateJavaVM call, returns -1
I don�t know, how can debug it, to find out what the problem is. The jvm.dll is in the project directory, the O.S. is Windows 2000 Professional and the JDK version 1.4
JNIEnv *env;
JavaVM *jvm;
jint res;
jclass cls;
jmethodID mid;
jstring jstr;
jclass stringClass;
jobjectArray args;
JavaVMInitArgs vm_args;
JavaVMOption options[1];
options[0].optionString = "-Djava.class.path= USER_CLASSPATH";
vm_args.version = JNI_VERSION_1_2;
vm_args.options = options;
vm_args.nOptions = 1;
vm_args.ignoreUnrecognized = JNI_TRUE;
/* Create the Java VM */
res = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
Some help will be apreciated
Thanks