以编程方式设置Djava.library.path(或替代方案)? [英] Setting Djava.library.path programmatically (or alternatives)?
本文介绍了以编程方式设置Djava.library.path(或替代方案)?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我希望以编程方式设置VM参数 Djava.library.path 。如果无法做到这一点,有什么选择(如果有的话)?
I am looking to set the VM argument Djava.library.path programmatically. If this can't be done, what are the alternatives (if there are any)?
推荐答案
看看这个java doc http:// docs.oracle.com/javase/6/docs/api/java/lang/System.html#setProperty(java.lang.String ,java.lang.String)
take a look at this java doc http://docs.oracle.com/javase/6/docs/api/java/lang/System.html#setProperty(java.lang.String, java.lang.String)
你想调用setProperty(String,String)方法。
you want to call the setProperty(String, String) method.
所以在你的情况下它看起来像这样
so it would look something like this in your case
System.setProperty("java.library.path","value_you_want");
这篇关于以编程方式设置Djava.library.path(或替代方案)?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文