there is a value in a.properties file, I want use it in b.properties
, for example in a.properties
I set a variable path = "some path"
, how can I use it in b.properties
,the destination is in b.properties there is a variable another_path = path/....
how can I make it ?
Asked
Active
Viewed 3,560 times
1

Wangbo
- 325
- 7
- 18
-
2possible duplicate of [Properties file : Use key as variable](http://stackoverflow.com/questions/11228218/properties-file-use-key-as-variable) – Tagir Valeev Jul 13 '15 at 10:01
-
more detail plz, tkx – Wangbo Jul 13 '15 at 10:18
-
As i understand , use simple Java code, get first property from a.properties and get another properties from b.properties file make path at java side. OR YOU WANT TO UPDATE PROPERTIE FILE . – bharatpatel Jul 13 '15 at 11:28
-
Possible duplicate of [Can I reference another property in a properties file (use ${property})](https://stackoverflow.com/questions/1412132/can-i-reference-another-property-in-a-properties-file-use-property) – OneCricketeer Jun 28 '17 at 19:56
-
[Your question is answered here - StackOverflow](https://stackoverflow.com/questions/1412132/can-i-reference-another-property-in-a-properties-file-use-property) As per the answer there, You could use the variable interpretation link. [Apache's Variable Interpolation](http://commons.apache.org/proper/commons-configuration/userguide/howto_basicfeatures.html#Variable_Interpolation) – Sunil Jul 13 '15 at 12:33