>    Andrew> I've been using the Blackdown JDK sucessfully for many
>    Andrew> weeks now.  I recently tried to invoke a java vm from an
>    Andrew> existing C application using the JNI_CreateJavaVM call. It
>    Andrew> seems that simply linking with libjava_g.so (where
>    Andrew> JNI_CreateJavaVM is defined) breaks calls to open().

>That's a known green threads problem (see 
>http://www.blackdown.org/java-linux/docs/faq/FAQ-java-linux-5.html#ss5.3).

Ack. RTFM! I did read all the READMEs but forgot the FAQ.

>The green threads libjava.so overrides some system calls (open, close,
>...). So you'll have to defer system calls until after the call to 
>JNI_CreateJavaVM.

I tried this (thanks for the suggestion). This allows my app to
come up but when I try to create a second JVM it dies. Is it illegal
to create more than one jvm?

--------------------------------------------------------------------

The second JNI_CreateJavaVM returns -1 and then:

Signal: Access violation

Error: "../../../../src/genunix/java/green_threads/src/synch.c", line 79: assertion 
failure

Full thread dump:
"../../../../src/genunix/java/green_threads/src/monitor_md.c", line 443: assertion 
failure

*** panic: Internal error dumping threads!
SIGABRT   6*   abort (generated by abort(3) routine)

*** panic: Internal error dumping threads!



-- 
Andrew Burgess
[EMAIL PROTECTED]
Available for software contract work: www.scruz.net/~cichlid

Reply via email to