startJVM是加载jvm用的方法。在JPype,apache mod等等很多地方都用到。但凡要用其他语言来加载jvm进程,就要用到这个。
可惜往往会出错。一般都是
Unable to load native library: libjvm.so: cannot open shared object file: No such file or directory
解决方法很简单:
在/etc/profile里面设置:
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/java/jre/lib/i386/client:/usr/local/java/jre/lib/i386