Skip to Main Content

Java APIs

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

There was an error trying to initialize the HPI library.

843810Jul 12 2005 — edited Aug 23 2009
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
/usr/bin directory (and is the default on the server). But I have set both
LD_LIBRARY_PATH, PATH and path
so that it points out 1.4.2. Here is the error

unable to create JVM
There was an error trying to initialize the HPI library.
Please check your installation, HotSpot does not work correctly
when installed in the JDK 1.2 Solaris Production Release, or
with any JDK 1.1.x release.

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
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 20 2009
Added on Jul 12 2005
5 comments
10,555 views