How to set system property values in NetBeans?

北城余情 提交于 2019-12-18 06:47:11

问题


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

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?


回答1:


  • You can right click on the project, and select Properties.

  • Click on Run category and insert you configuration in VM Options

  • For instance, in your case, paste: -Djava.security.auth.login.config=sample_jaas.config

You've to use = not ==.



来源:https://stackoverflow.com/questions/7838912/how-to-set-system-property-values-in-netbeans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!