error occuring with JNI_CreateJavaVM: implicity dependency

Hi ,

I tried to create example program of JNI as shown in trial. I wanted to invoke a java program from C. I am unable to compile it. I am sending the compile command and the output I got. I used jni version 1.2

##########Compile Command#########

gcc -I/usr/java1.3.1/include/ -I/usr/java1.3.1/include/solaris -L/usr/java1.3.1/jre/lib/sparc/ -ljava invokenew.c

#######################################################

*************Output*******************

Undefined first referenced

symbol in file

JNI_CreateJavaVM /var/tmp/ccmQWGHn.o (symbol belongs to implicit dependency /usr/java1.3.1/jre/lib/sparc//libjvm.so)

ld: fatal: Symbol referencing errors. No output written to a.out

collect2: ld returned 1 exit status

*********************************************************

I would be glad if someone can answer my question.

Thank you,

Kiran

[933 byte] By [psrikirana] at [2007-9-28 1:57:38]
# 1
You should be linking with libjvm.so.God bless,-Toby ReyeltsCheck out Jace, http://jace.reyelts.com/jace
rreyeltsa at 2007-7-7 21:30:37 > top of Java-index,Java HotSpot Virtual Machine,Specifications...