This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Fix JNI Invocation


I'm checking in this patch to fix JNI to account for the recent 
initialization changes. Thanks to Martin for testing it.

regards

Bryce.


2001-10-30  Bryce McKinlay  <bryce@waitaki.otago.ac.nz>

        * jni.cc (JNI_CreateJavaVM): Call _Jv_CreateJavaVM. Don't call
        _Jv_JNI_Init.

Index: jni.cc
===================================================================
RCS file: /cvs/gcc/egcs/libjava/jni.cc,v
retrieving revision 1.53
diff -u -r1.53 jni.cc
--- jni.cc	2001/10/16 08:35:17	1.53
+++ jni.cc	2001/10/30 10:11:32
@@ -2108,6 +2108,9 @@
 JNI_CreateJavaVM (JavaVM **vm, void **penv, void *args)
 {
   JvAssert (! the_vm);
+
+  _Jv_CreateJavaVM (NULL);
+
   // FIXME: synchronize
   JavaVM *nvm = (JavaVM *) _Jv_MallocUnchecked (sizeof (JavaVM));
   if (nvm == NULL)
@@ -2162,8 +2165,6 @@
 
   the_vm = nvm;
   *vm = the_vm;
-
-  _Jv_JNI_Init();
 
   return 0;
 }

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]