S
Steve
Hi
I am trying to Create the JVM with no luck
I always get a -1 from the CreateJaveVM
I have jvm.dll in \WINNT\System32
Are there other dll or libraries that I need in my search path???
Any other suggestions???
Thanks
Steve
#include "C:\JBuilder9\jdk1.4\include\jni.h"
#include "SimpleJ.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
long result;
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs vm_args;
JavaVMOption options[1];
vm_args.version = JNI_VERSION_1_4;
vm_args.nOptions = 1;
options[0].optionString = "-Djava.class.path=C:\\WINNT\\java\\classes";
vm_args.options = options;
vm_args.ignoreUnrecognized = JNI_FALSE;
result = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
if (result < 0)
{
MessageBox(NULL, "Error Create JAVAVM", "JAVA VM", MB_OK);
return -1;
}
I am trying to Create the JVM with no luck
I always get a -1 from the CreateJaveVM
I have jvm.dll in \WINNT\System32
Are there other dll or libraries that I need in my search path???
Any other suggestions???
Thanks
Steve
#include "C:\JBuilder9\jdk1.4\include\jni.h"
#include "SimpleJ.h"
int APIENTRY WinMain(HINSTANCE hInstance,
HINSTANCE hPrevInstance,
LPSTR lpCmdLine,
int nCmdShow)
{
long result;
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs vm_args;
JavaVMOption options[1];
vm_args.version = JNI_VERSION_1_4;
vm_args.nOptions = 1;
options[0].optionString = "-Djava.class.path=C:\\WINNT\\java\\classes";
vm_args.options = options;
vm_args.ignoreUnrecognized = JNI_FALSE;
result = JNI_CreateJavaVM(&jvm, (void **)&env, &vm_args);
if (result < 0)
{
MessageBox(NULL, "Error Create JAVAVM", "JAVA VM", MB_OK);
return -1;
}