Hai, I am new to java programming. I am trying to invoke native application using JVM. I have a written a pilot code in C using JNI. I am getting the following error when I try to run the binary. I think that the problem is from the fact that 1.2.2 is installed in unable to create JVM while building the binary I am using JDK1.4.1 header and lib files These are my compilation arguments g++ -g -I/opt/BES/jdk/jdk1.4.1/include/ -I/opt/BES/jdk/jdk1.4.1/include/solaris/ -L/opt/BES/jdk/jdk1.4.1/jre/lib/sparc/ -ljvm -ljava jniTest.C If anybody has an idea why i am getting this problem and how to handle it? Thanks /////////////////////////////////////////////////////////////// I had a similar problem. This is what I did to fix it: Specify the jvm that you want to use specifically (the server or client) Make sure that you specify the server or client path before you specify the sparc path (THE ORDER MATTERS!!): -L/opt/BES/jdk/jdk1.4.1/jre/lib/sparc/client I included the above lines when I compiled, but I also added the two paths to my LD_LIBRARY_PATH env variable before running. *** THE ORDER MATTERS!! Good Luck, /////////////////////////////////////////////////////////////// This error may arise because the library file is not found or because there is a version mismatch. The latter may happen, for example, if you run 'java' from one Java distribution whereas your JAVA_HOME points to another Java distribution. (In the latter case, ensure JAVA_HOME is unset when calling 'java'.) Also, try passing this option to your java: -XX:+TraceHPI -- it may actually tell you what it is trying to do. |