It won't create a Java VM (JNI)

Posted by Michael Bruckmeier on Stack Overflow See other posts from Stack Overflow or by Michael Bruckmeier
Published on 2010-04-03T07:30:14Z Indexed on 2010/04/03 7:33 UTC
Read the original article Hit count: 915

Filed under:
|
|
|

My simple command line app:

int _tmain(int argc, _TCHAR* argv[])
{
 JavaVM *jvm;
 JNIEnv *env;
 JavaVMInitArgs vm_args;
 JavaVMOption options[1];
 options[0].optionString = "-Djava.class.path=."; //Path to the java source code
 vm_args.version = JNI_VERSION_1_6; //JDK version. This indicates version 1.6
 vm_args.nOptions = 1;
 vm_args.options = options;
 vm_args.ignoreUnrecognized = 0;

 jint ret = JNI_CreateJavaVM(&jvm, (void**)&env, &vm_args);
 return 0;
}

gives me:

Error occurred during initialization of VM
Unable to load native library: Can't find dependent libraries

The breakpoint at "return 0" is never reached. jvm.dll resides in same directory as my command line app.

I don't get it what's wrong. Any Ideas? Thanx in advance

© Stack Overflow or respective owner

Related posts about java

Related posts about jni