#include <jni.h>
#include <conio.h>
#include <iostream>
#pragma comment(lib,"jvm.lib");
#include <stdio.h>
JNIEnv* create_vm() {
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs args;
JavaVMOption options[1];
/* There is a new JNI_VERSION_1_4, but it doesn't add anything for the purposes of our example. */
args.version = JNI_VERSION_1_2;
args.nOptions = 1;
options[0].optionString = "-Djava.class.path=c:\\projects\\local\\inonit\\classes";
args.options = options;
args.ignoreUnrecognized = JNI_FALSE;
JNI_CreateJavaVM(&jvm, (void **)&env, &args); //exit with code 1 (0x1)
return env;
}
int main(int argc, char **argv) {
JNIEnv* env = create_vm();
//invoke_class( env );
system("pause");
}
It quits at JNI_CreateJavaVM(&jvm, (void **)&env, &args);
- The program '[3084] test.exe: Native' has exited with code 1 (0x1).
anyone know why? Or can help me somehow with solving this problem?
I tried chaning options[0].optionString to path to the classes stuff of jdk examples but it doesnt change anything...
any help appreciated...
c++, jdk, creation of jvm problem. App just exist.
Hello guys.
Im looking for help with implementaion of Java VM in my renderer written in C++
Im using jdk 1.6.0_17.
This is the whole code of my test app which doesnt work:
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement