在Eclipse上测试时如何传递-D系统属性? [英] How to pass the -D System properties while testing on Eclipse?

查看:139
本文介绍了在Eclipse上测试时如何传递-D系统属性?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在Windows上开发Eclipse,并在Unix上部署代码。我使用System.getProperty(key)获取系统属性值...如何在Eclipse中传递这个,以便我不必修改代码,并且它可以在Eclipse上进行调试?



任何建议?

解决方案

运行 - >运行配置,选择项目,第二个选项卡:参数。顶盒是为您的程序,底部框是用于VM参数,例如 -Dkey = value


I am developing on Eclipse on Windows and Code gets deployed on Unix. I am fething the system property values using System.getProperty("key") ... how do I pass this in Eclipse so that I do not have to modify the code and it works on Eclipse for debugging?

Any suggestions?

解决方案

Run -> Run configurations, select project, second tab: "Arguments". Top box is for your program, bottom box is for VM arguments, e.g. -Dkey=value.

这篇关于在Eclipse上测试时如何传递-D系统属性?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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