From mboxrd@z Thu Jan 1 00:00:00 1970 From: a1tv86@yahoo.com To: java-gnats@sourceware.cygnus.com Subject: libgcj/1300: fail to call JNI_CreateJavaVM() Date: Wed, 20 Dec 2000 12:24:00 -0000 Message-id: <20000705213812.8605.qmail@sourceware.cygnus.com> X-SW-Source: 2000-q4/msg01078.html List-Id: >Number: 1300 >Category: libgcj >Synopsis: fail to call JNI_CreateJavaVM() >Confidential: no >Severity: serious >Priority: high >Responsible: tromey >State: open >Class: sw-bug >Submitter-Id: net >Arrival-Date: Wed Dec 20 12:18:51 PST 2000 >Closed-Date: >Last-Modified: >Originator: a1tv86@yahoo.com >Release: libgcj-snapshot-2000-06-20 >Organization: >Environment: Solaris 2.6 >Description: Build the libgcj with option --enable-threads=none Compile the following simple program: ---------------------- #include #include int main(int argc, char* argv[]) { int nError = 0; JavaVMInitArgs sArgs; JavaVMOption sOptions[2]; JavaVM *psMachine = (JavaVM *)0; void *pvEnv = (void *)0; sArgs.version = JNI_VERSION_1_2; JNI_GetDefaultJavaVMInitArgs(&sArgs); sOptions[0].optionString = "-Djava.compiler=NONE"; sOptions[0].optionString = "-Djava.class.path=.:/usr/local/lib"; nError = JNI_CreateJavaVM(&psMachine, &pvEnv, &sArgs); if (nError < 0) { cout << "Error: "; cout << nError; cout << " - JNI_CreateJavaVM()\n"; } /* if */ else { } /* else */ return 0; } /* main */ -------------------- Build the executable. Run the executable, get an error when call JNI_CreateJavaVM(). Step through gdb, _Jv_JNI_AttachCurrentThread() returns NULL. >How-To-Repeat: see description. >Fix: >Release-Note: >Audit-Trail: Formerly PR libgcj/279 >Unformatted: