Dear sir,
 
I want C to invokes Java instead of Java invokes C. I
attached 3 files here--fromjava.java, javatoc.c and error. I successful
compiled javatoc.c by following

#gcc -D_REENTRANT -D_GNU_SOURCE -I/usr/java/jdk1.3/include -I/usr/java/jdk1.
3/include/linux -c -o javatoc.o javatoc.c

# gcc -o javatoc
javatoc.o -L/usr/java/jdk1.3/jre/lib/i386/classic -L/usr/java/jdk1.3/jre/lib
/i386/native_threads -L/usr/java/jdk1.3/jre/lib/i386/ -ljvm -lhpi

and run it:
#LD_LIBRARY_PATH=/usr/java/jdk1.3/jre/lib/i386/classic:/usr/java/jdk1.3/jre/
lib/i386/native_threads:/usr/java/jdk1.3/jre/lib/i386 ./javatoc

but it give me error as shown in error file.

Did I do something wrong? I could access Java String from C while using Java
invokes C method. But When it comes to C invokes Java - create JVM inside C
code, I don't know how to solve it.

Again, Thank you very much.

soonho


Error

fromjava.java

Javatoc.c

Reply via email to