I use JDK1.2.2 RC2 on RedHat 6.1.
The following code gives a SIGSEGV on JNI_CreateJavaVM.
Could you tell me where is the problem.
#include <stdlib.h>
#include <iostream.h>
#include <jni.h>
int main(int argc, char **argv)
{
JavaVM * jvm;
JNIEnv * env;
JavaVMInitArgs vm_args;
vm_args.version = 0x00010001;
JNI_GetDefaultJavaVMInitArgs ( &vm_args );
jint res = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
if (res < 0)
{
cerr << "JVM has not started" << endl;
exit(1);
}
cout << "JVM started" << endl;
jvm->DestroyJavaVM();
}
Pierre
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]