如何设置在NetBeans系统属性值? [英] How to set system property values in NetBeans?

查看:262
本文介绍了如何设置在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屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆