Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Java and C++

0 views
Skip to first unread message

Todd Hill Miller

unread,
Oct 6, 2000, 4:21:45 PM10/6/00
to

I'm looking for a way to use Java code in conjuction with a C++ program. Is
there any good method for doing this (other than issuing a call to system() or
forking a new process)?

--

-Todd Miller (tomi...@cc.gatech.edu)

Ivan Brusic

unread,
Oct 6, 2000, 4:38:54 PM10/6/00
to
Todd Hill Miller <tomi...@cc.gatech.edu> wrote:

> I'm looking for a way to use Java code in conjuction with a C++ program. Is
> there any good method for doing this (other than issuing a call to system() or
> forking a new process)?

Just to understand better: do you want to call Java code from C++ or
vicevera?

Calling C++ code from Java is doable (but not easy) using JNI, but calling
Java from C++ is quite hard. The latter requires you starting up a Java
VM and sending code to it. Just look at any Java browser plug-in spec to
see the gory details.

Ivan

nick alamout black

unread,
Oct 6, 2000, 4:41:20 PM10/6/00
to
Todd Hill Miller consulted the pineal gland and uttered:

> I'm looking for a way to use Java code in conjuction with a C++ program. Is
> there any good method for doing this (other than issuing a call to system() or
> forking a new process)?

last time i did this, it involved java.util.Observable and a lot of
cursing when i realized garbage collection made it that a reference to a
java object might spontaneously disappear from the heap. if you feel
strong, mix a tall one and look at the white paper on javaworld:

www.javaworld.com/javaworld/javatips/jw-javatip17.html

--
nick black cs/math major [ God: Your status of deity has been
georgia institute of technology[ revoked due to gross incompetance.
http://www.cc.gatech.edu/~dank[ Your check is in the mail. Please
da...@math.gatech.edu 4o4.876.9143[ do not use us for a reference. -PD

0 new messages