• Post Reply Bookmark Topic Watch Topic
  • New Topic

JDK1.4/JNI1.? Invoke JVM failed error -1/-3  RSS feed

 
Ian Ferreira
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using the Invokation API on JDK1.4 calling the function JNI_CreateJavaVM failed.
From the tutorial or the javadocs examples:-
-------------------------------------------------
JDK1_1InitArgs vm_args; /* JDK 1.1 VM itialization arguments */
vm_args.version = 0x00010001; /* New in 1.1.2: VM version */
/* Get the default initialization arguments and set the class path */
JNI_GetDefaultJavaVMInitArgs(&vm_args);
vm_args.classpath = ...;
/* load and initialize a Java VM, return a JNI interface pointer in env */
jint res = JNI_CreateJavaVM(&jvm, &env, &vm_args);
-------------------------------------------------
If you look in the <jni.h> the versions is defined as JNI_VERSION_1_1, JNI_VERSION_1_2 or JNI_VERSION_1_4 - I assume last is for JDK1.4.
Using v1.1 return res = -3,
else (v1.2/v1.4) res = -1;
I also failed to find help on these error codes and they are also not normal Windows errors or HRESULTS.
Another point that is confusing is that the JVM.DLL come in two flavours under the JDK instalation
<path>j2sdk1.4.1_01\jre\bin\client\jvm.dll and
<path>j2sdk1.4.1_01\jre\bin\server\jvm.dll.
Using the one versus the other dont seem to make any difference.
More confusing is this java versioning JDK1.4 / JNI 1.1 / JVM 1.1.2, etc...
Does anybody have a solution regarding this.
Maybe I should send this to SUN and see what they got to say, maybe a bug ?
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!