public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
* libgcj/1300: fail to call JNI_CreateJavaVM()
@ 2000-12-20 12:24 a1tv86
0 siblings, 0 replies; 2+ messages in thread
From: a1tv86 @ 2000-12-20 12:24 UTC (permalink / raw)
To: java-gnats
>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 <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:
Formerly PR libgcj/279
>Unformatted:
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: libgcj/1300: fail to call JNI_CreateJavaVM()
@ 2002-04-15 3:14 bryce
0 siblings, 0 replies; 2+ messages in thread
From: bryce @ 2002-04-15 3:14 UTC (permalink / raw)
To: a1tv86, gcc-bugs, gcc-prs, java-prs, tromey
Synopsis: fail to call JNI_CreateJavaVM()
State-Changed-From-To: analyzed->closed
State-Changed-By: bryce
State-Changed-When: Mon Apr 15 03:14:07 2002
State-Changed-Why:
Fixed for GCJ 3.1.
JNI_CreateJavaVM() is working now.
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=1300
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-04-15 10:14 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-12-20 12:24 libgcj/1300: fail to call JNI_CreateJavaVM() a1tv86
2002-04-15 3:14 bryce
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).