src/share/native/com/sun/java/util/jar/pack/jni.cpp

Print this page

        

@@ -80,11 +80,12 @@
 
 // This is the harder trick:  Pull the current state out of mid-air.
 static unpacker* get_unpacker() {
   //fprintf(stderr, "get_unpacker()\n");
   JavaVM* vm = null;
-  JNI_GetCreatedJavaVMs(&vm, 1, null);
+  jsize nVM = 0;
+  JNI_GetCreatedJavaVMs(&vm, 1, &nVM);
   void* envRaw = null;
   vm->GetEnv(&envRaw, JNI_VERSION_1_1);
   JNIEnv* env = (JNIEnv*) envRaw;
   //fprintf(stderr, "get_unpacker() env=%p\n", env);
   if (env == null)