Originally posted by Chris Huisman: I am having trouble starting a JVM via JNI. Does anybody know what the return value of JNI_CreatJavaVM indicates?
JNI_CreateJavaVM fills in two return values: jvm refers to the created Java Virtual Machine. You can use this to destroy the Virtual Machine at a later time. env is a JNI interface pointer that the current thread can use to access Java features, such as calling a Java method. regds gat
The return value of JNI_CreateJavaVM is 0 if there's no problem, and a negative number if there was an error. From jni.h: #define JNI_OK 0 /* success */ #define JNI_ERR (-1) /* unknown error */ #define JNI_EDETACHED (-2) /* thread detached from the VM */ #define JNI_EVERSION (-3) /* JNI version error */ #define JNI_ENOMEM (-4) /* not enough memory */ #define JNI_EEXIST (-5) /* VM already created */ #define JNI_EINVAL (-6) /* invalid arguments */ Granted, this topic is quite old, but hopefully if Google picks it up it'll help someone down the road
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop