Hello, I have two questions about properties files. 1. Is it possible to import a properties file from another properties file? 2. Is it possible to have variables in a properties file as described below in code snippet. Thanks in advance, Julien.
Code snippet:
var_one=foo var_two=$var_one bar
The second line would then read "foo bar"
Ulf Dittmer
Marshal
Joined: Mar 22, 2005
Posts: 35241
7
posted
0
to 1) No. You can load two files into two Properties objects, and merge them using the putAll method, though.
to 2) Not exactly like that. You can use "var_two={0} bar", and then {0} (and {1} etc.) is a variable that you can set programmatically later, but you can't directly reference other properties like in your example.