Eclipse 系统属性

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/3289140/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 14:54:50  来源:igfitidea点击:

Eclipse System property

javaeclipse

提问by hakish

I need to set the value of a system property java.library.path to c:\somepath. i know that i need to add this in the vm args section. Could some please provide the actual syntax.

我需要将系统属性 java.library.path 的值设置为 c:\somepath。我知道我需要在 vm args 部分添加它。请一些人提供实际的语法。

采纳答案by Andreas Dolk

The argument is

论据是

-Djava.library.path=c:/somepath

To test if it's correct:

要测试它是否正确:

String key = "java.library.path";
System.out.printf("%s=%s%n", key, System.getProperty(key));