GCJ and Native Methods
Daniel P. Zepeda
dpz@pobox.com
Fri Oct 15 19:29:00 GMT 1999
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:
@rocinante:/home/dpz/src/JNITest.d> gcj -o hw --main=HelloWorld
HelloWorld.java /tmp/ccT903BJ.o: In function
`HelloWorld::HelloWorld(void)':
/home/dpz/src/JNITest.d/HelloWorld.java(.data+0x2c): undefined reference
to `HelloWorld::displayHelloWorld(void)' /tmp/ccT903BJ.o: In function
`HelloWorld::main(JArray<java::lang::String *> *)':
/home/dpz/src/JNITest.d/HelloWorld.java:8: undefined reference to
`HelloWorld::displayHelloWorld(void)' collect2: ld returned 1 exit status
--
Daniel P. Zepeda
dpz@pobox.com
"In complete darkness, we are all the same. Only our knowledge and wisdom
separates us there." -- J. Jackson
More information about the Java
mailing list