开发者

How to restart the Java Process with -Djava.library.path?

I have an application that is started with JWS. The first time user launches this application he has to choose a path where Berkeley DB XML is installed. I do need this to set the native library path and restart the application with -Djava.library.path parameter. Berkeley DB XML java bindings uses JNI to make calls to the database. Since our users may have different OS I cannot rely on a default location.

So, I have a problem with getting current classpath. When I print out "java.class.path" it only gives me "/System/Librar开发者_C百科y/Frameworks/JavaVM.framework/Resources/Deploy.bundle/Contents/Home/lib/deploy.jar". I have three jars that I cannot find in my sys props. on my Mac.

I hope this was understandable and thanks for any tips beforehand.


Try to repaire permissions with DiskUtil.

Avoid using this pattern. What you could do is to store the command and execute that simulating that you are starting a new process.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜