This is the mail archive of the
java@gcc.gnu.org
mailing list for the Java project.
Using CNI to call compiled java from C++
- From: Stephane MILLET <stef dot millet at wanadoo dot fr>
- To: java at gcc dot gnu dot org
- Date: Tue, 21 Oct 2003 19:59:05 +0200
- Subject: Using CNI to call compiled java from C++
- Reply-to: stef dot millet at wanadoo dot fr
Hi,
I'm working on a C++ application and wanted to use Java code in it. To
do that, i've been trying to use CNI functions to call compiled java
code with their gcjh produced headers. I first create the JVM, then
attach the current thread as defined in the manual. Then, when I need a
particular java class instance, i do a new in C++ and use the instance.
But, how and when will this object be deleted ? The GC doesn't seem to
care about it.
Otherwise, is this use of CNI and GCJ the right use ?
I'm using Redhat 7.3 with gcc 3.2.
Stephane MILLET