问题
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