开发者

setting LD_LIBRARY_PATH using tomcat's setenv.sh script

I can't seem to get tomcat to properly set environment variables. I can run my .jar normally with my LD_LIBRARY_PATH set to the correct place, it finds my external libraries just fine. If I unset LD_LIBRARY_PATH and run the jar I get the error:

java.lang.RuntimeException: Native code library failed to load: 
  ensure the appropriate library (opl<VERSION>.dll/.so) is in your path.

which is to be expected.

Anyway, I created 开发者_如何学Ca tomcat/bin/setenv.sh script that looks like this:

LD_LIBRARY_PATH=/home/public/lib

But when I run my code over the webservice I still get the same error:

java.lang.RuntimeException: Native code library failed to load: 
  ensure the appropriate library (opl<VERSION>.dll/.so) is in your path.

Any ideas?


export LD_LIBRARY_PATH

Is what you are missing.

and also perhaps an appropriate addition of -Djava.library.path=MYDIR to the java flags.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜