Eclipse RCP config.ini [英] Eclipse RCP config.ini

查看:207
本文介绍了Eclipse RCP config.ini的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

可以在 RCP插件项目中调用和使用由 RCP产品生成的confi.ini文件

Is it possible to call and use the confi.ini file generated by RCP product in RCP plugin project ?

配置标签中,我添加了两个我想要调用并在我的 RCP插件项目中使用的属性。
这两个属性是一个 URL 地址和 KEY 。我已经将它们添加到 config.ini 中,所以当我导出我的 RCP产品并稍后进行部署时,其他用户可以修改 KEY 网址
我希望我的帖子足够清楚!

In the Configuration tab i've added two properies that i want to call and use in my RCP plugin project . The two properties are an URL adress and a KEY. I've added them in the config.ini so when I export my RCP product and deploy it later, other users could modify the KEY or the URL. I hope that my post is clear enough !

提前感谢

Ismail


Ismail

推荐答案

可以使用标准访问 config.ini 中定义的属性 System.getProperty(property-name)调用。

Properties you define in the config.ini can be accessed using the standard System.getProperty("property-name") call.

当您在Eclipse中使用运行配置您可以指定参数选项卡中的属性,VM参数部分使用以下格式:

When you are testing an RCP in Eclipse using a Run Configuration you can either specify the property in the Arguments tab, VM arguments part, using the format:

-Dproperty=value

或者您可以在配置选项卡上指定 config.ini 模板。在这两种情况下,您仍然使用 System.getProperty 来访问该值。

Or you can specify a config.ini template on the Configuration tab. In either case you still use System.getProperty to access the value.

这篇关于Eclipse RCP config.ini的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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