>>>>> "soonho" == soonho <[EMAIL PROTECTED]> writes:
soonho> I currently using jdk1.3 in my RedHat 6.1. I am testing
soonho> the invoke.c example in the following URL:
soonho> http://www.java.sun.com/docs/books/tutorial/native1.1/invoking/invo.html
soonho> But when compile using
soonho> gcc -I/usr/java/jdk1.3/include -I/usr/java/jdk1.3/include/linux
soonho> -L/-I/usr/java/jdk1.3/jre/lib/i386 -Ljava invoke.c
soonho> it give me errors.
soonho> 1. Is it -ljava or -Ljava? Both give me different errors.
It's -ljvm. Our J2SDK includes a script "j2sdk-config" which will
give you the right values for your installation. E.g.
% j2sdk-config --cflags
-D_REENTRANT -D_GNU_SOURCE -I/usr/lib/j2sdk1.3/include
-I/usr/lib/j2sdk1.3/include/linux
% j2sdk-config --libs
-L/usr/lib/j2re1.3/lib/i386/client -ljvm -lpthread
BTW, there's an Invocation API example in our FAQ
http://www.blackdown.org/java-linux/docs/support/faq-release/examples/invocation-in-C++/
Juergen
--
Juergen Kreileder, Blackdown Java-Linux Team
http://www.blackdown.org/java-linux.html
JVM'01: http://www.usenix.org/events/jvm01/
----------------------------------------------------------------------
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]