startJVM is the method used to load jvm. It is used in JPype, apache mod and many other places. Whenever you want to use other languages to load the jvm process, you must use this.
Unfortunately, things often go wrong. Generally, the code is copied as follows:
Unable to load native library: libjvm.so: cannot open shared object file: No such file or directory
But libjvm.so does exist.
The solution is simple:
Set in /etc/profile:
Copy the code as follows: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/java/jre/lib/i386/client:/usr/local/java/jre/lib/i386
This way you can find other link libraries. That's no problem. It's quite simple, but the error message is libjvm.so and No such file or directory, so it's very confusing.