when i use javavm on my linux(64bit),
i get the error: …/amd64/server/libjvm.so:file not recognized: file fromat not recognized.
i can’t search any helpful info about this.
Linking JNI lib on Linux with Java 7 JDK
g++ -L$MYJDK/jre/lib/amd64/server -ljvm touch.o -o testjdk
/tc_work/dsd/testjdk7/jdk1.7.0_02/jre/lib/amd64/server/libjvm.so: file not recognized: File format not recognized
file $MYJDK/jre/lib/amd64/server/libjvm.so
/tc_work/dsd/testjdk7/jdk1.7.0_02/jre/lib/amd64/server/libjvm.so: ELF 64-bit LSB shared object, AMD x86-64, version 1 (SYSV), not stripped
nm $MYJDK/jre/lib/amd64/server/libjvm.so
nm: /tc_work/dsd/testjdk7/jdk1.7.0_02/jre/lib/amd64/server/libjvm.so: File format not recognized
I suppose you came across this bug: https://bugs.java.com/bugdatabase/view_bug?bug_id=7152237, see also https://stackoverflow.com/questions/9619513/linking-jni-lib-on-linux-with-java-7-jdk. I suggest to upgrade your toolchain (g++) to a more recent version, if possible.