如何设置在NetBeans系统属性值? [英] How to set system property values in NetBeans?
问题描述
我是遵循有关JAAS认证教程<一个href=\"http://download.oracle.com/javase/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html\"相对=nofollow>这里,当它显示了如何运行示例code表示,已编译的类应与Java启动的标准选项,是-Djava.security.auth.login推出==的.config sample_jaas.config。在这种方式的系统属性将被设置
I 'm following a tutorial about JAAS Authentication here and when it shows how to run the example code, says that the compiled class should be launched with a standard option of Java launcher which is -Djava.security.auth.login.config==sample_jaas.config . In this way a system property will be set:
java -Djava.security.auth.login.config==sample_jaas.config sample.SampleAcn
我这样做了,但现在我想运行NetBeans中的code了。由于NetBeans使用Ant我想指定这些选项可能会有所不同。我看着NetBeans中的选项菜单,但没有发现任何东西。
我怎么能与NetBeans运行时,设置该属性?
I did it with this way, but now I want to run the code in NetBeans too. Since NetBeans use Ant I think specifying these options may be different. I looked at the options menus in NetBeans but didn't find anything. How could I set this property when running with NetBeans?
推荐答案
-
您可以用鼠标右键单击该项目,并选择
属性
。
点击运行
类和插入你的配置VM选项
例如,在你的情况,贴: -Djava.security.auth.login.config = sample_jaas.config
For instance, in your case, paste: -Djava.security.auth.login.config=sample_jaas.config
您已经使用 =
不是 ==
。
这篇关于如何设置在NetBeans系统属性值?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!