This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: GCJ and Native Methods


"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 ]



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]