Eclipse RCP config.ini

烂漫一生 提交于 2019-12-13 06:22:19

问题


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

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 !

Thanks in advance.

Ismail


回答1:


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

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

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



来源:https://stackoverflow.com/questions/20739927/eclipse-rcp-config-ini

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