GCJ and Native Methods
Bryce McKinlay
bryce@albatross.co.nz
Fri Oct 15 21:19:00 GMT 1999
"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 ]
More information about the Java
mailing list