General discussion

Locked

Error in creating JVM

By sitay2001 ·
I've got following error message while compiling the C program (which will create a JVM). I have already include the path of the jni.h and jni_md.h during compilation.

Does anyone know the causes of such error and how to solve it?

/tmp/cc3QW6IQ.o: In function `main':
/tmp/cc3QW6IQ.o(.text+0x16): undefined reference to `JNI_GetDefaultJavaVMInitArgs'
/tmp/cc3QW6IQ.o(.text+0x55): undefined reference to `JNI_CreateJavaVM'
collect2: ld returned 1 exit status


Thanks

This conversation is currently closed to new comments.

5 total posts (Page 1 of 1)  
| Thread display: Collapse - | Expand +

All Comments

Collapse -

Error in creating JVM

by Gavin Taylor In reply to Error in creating JVM

This is a link problem: you are not linking against the shared library that includes the JNI functions.

You don't say what OS you're on, but for Solaris, the library is libjvm.so (look for it under the jre directory tree of your java installation).

HTH.

Collapse -

Error in creating JVM

by sitay2001 In reply to Error in creating JVM

The question was auto-closed by TechRepublic

Collapse -

Error in creating JVM

by GIJoe In reply to Error in creating JVM

Is this still a problem?

Collapse -

Error in creating JVM

by sitay2001 In reply to Error in creating JVM

The question was auto-closed by TechRepublic

Collapse -

Error in creating JVM

by sitay2001 In reply to Error in creating JVM

This question was auto closed due to inactivity

Back to Web Development Forum
5 total posts (Page 1 of 1)  

Related Discussions

Software Forums