public inbox for gcc-prs@sourceware.org
help / color / mirror / Atom feed
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	[thread overview]
Message-ID: <20000705213812.8605.qmail@sourceware.cygnus.com> (raw)

>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:


             reply	other threads:[~2000-12-20 12:24 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2000-12-20 12:24 a1tv86 [this message]
2002-04-15  3:14 bryce

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20000705213812.8605.qmail@sourceware.cygnus.com \
    --to=a1tv86@yahoo.com \
    --cc=java-gnats@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).