How to reference another property in java.util.Properties?

Solution 1:

Chris Mair's XProperties class may be a good starting point.

You can substitute a constant anywhere in the property value, and even have more than one constant within a value, as in the following example:

CONST_1 = shoes and ships
CONST_2 = sealing wax
SomeValue = {CONST_1} and {CONST_2} 

In this example, the "SomeValue" property evaluates to "shoes and ships and sealing wax."

Solution 2:

Eproperties is the open source project which provides variable substitution along with a few other features - although substitution may arguably be the most useful. It is a subclass of java.util.Properties, and will can be used by any other class that may take configuration information as Properties.