[vox-tech] calling java from within C

Peter Jay Salzman p at dirac.org
Fri Apr 21 11:20:33 PDT 2006


I'm trying to figure out how to call Java from within C.

It appears that I have three options:

1. If the Java is already running as a process, there's something called
   CORBA which can be used.
2. JNI which appears to be most popular.
3. CNI which someone said was 'vastly' more efficient than JNI.


Most of the JNI docs I've seen are for calling C from within Java, not the
other way around which I'm more interested in.  The few examples of calling
Java I've seen on the web seem to be outdated; they're from the Java 1.2
days, and I guess the interface has changed since then.

Has anyone here been able to call Java from within C code?  I'd really like
to see an example (or read explicit docs).

Thanks!
Pete


More information about the vox-tech mailing list