This is the mail archive of the
java-discuss@sourceware.cygnus.com
mailing list for the Java project.
Re: GCJ and Native Methods
- To: dpz at pobox dot com
- Subject: Re: GCJ and Native Methods
- From: Bryce McKinlay <bryce at albatross dot co dot nz>
- Date: Sat, 16 Oct 1999 17:22:37 +1300
- CC: Java Discuss List <java-discuss at sourceware dot cygnus dot com>
- References: <99101521285402.13442@rocinante>
"Daniel P. Zepeda" wrote:
> Hi,
> Does GCJ support using straight C native methods ala JNI? I've seen
> the documents on the CNI, but I just want to do some kernel ioctl()'s to
> get some information from the kernel and CNI seems to be more complicated
> than I need. Can GCJ compile a class file that has such a thing in it?
> I tried the simple HelloWorld that Sun has on their site as an example for
> JNI and I get:
Hi Daniel,
libgcj does not yet support JNI, but support is planned I believe. Of course
gcj should happily _compile_ a classfile that uses JNI, as native methods are
specified in the same way. You just need to {port/implement} the native part
of the class {to/using} CNI.
I find that CNI is actually a lot simpler than JNI, and it is well documented.
It is also more efficient (ie faster) than JNI, apparently.
regards
[ bryce ]