Remy,
This is a known problem on all versions of Java. Here is the quote from
the Java Series Book, "The Java Native Interface" by Sheng Liang:
"Unfortunately, you cannot unload the Java virtual machine implementation
in JDK release 1.1 or Java 2 SDK release 1.2. DestroyJavaVM always
returns an error code in these releases."
I don't whether this means that it will be fixed in 1.3? In any event, in
the case of a C program, my experience is that the JVM is unloaded when
your program terminates. In the case of a C DLL, we basically make sure
that we load the JVM only once since we cannot destroy it. When the C
DLL leaves memory, the JVM may be destroyed. So far, this approach has
worked OK for us.
Cynthia Jeness
Remy Dupas wrote:
> I use JDK 1.2 with RedHat 6.0 Linux 2.2.5-15
>
> I invoke the Java Virtual Machine from a program C as described in the
> example of the tutorial
>
> At the end of this program, I call (*jvm)->DestroyJavaVM(jvm) but it
> returns -1.
>
> So it seems that the Java Virtual Machine has not been destroyed, and
> consequently i can't invoke it a second time
>
> Can anyone helps me. Thanks in advance
>
> Remy
>
> ----------------------------------------------------------------------
> To UNSUBSCRIBE, email to [EMAIL PROTECTED]
> with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]