This is the mail archive of the
java-prs@sourceware.cygnus.com
mailing list for the Java project.
libgcj/279: fail to call JNI_CreateJavaVM()
- To: java-gnats at sourceware dot cygnus dot com
- Subject: libgcj/279: fail to call JNI_CreateJavaVM()
- From: a1tv86 at yahoo dot com
- Date: 5 Jul 2000 21:38:12 -0000
- Reply-To: a1tv86 at yahoo dot com
- Resent-Cc: java-prs at sourceware dot cygnus dot com, green at cygnus dot com
- Resent-Reply-To: java-gnats@sourceware.cygnus.com, a1tv86@yahoo.com
>Number: 279
>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 Jul 05 14:40:00 PDT 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 <iostream.h>
#include <jni.h>
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:
>Unformatted: