/** * Substitutes variables in <code>aString</code> with the environment values in the system properties * * @param aString * the string on which to apply the substitution. * @param systemProperties * the system properties to use * @return the string with the substitution applied. */ public static final synchronized String environmentSubstitute( String aString, Map<String, String> systemProperties ) { Map<String, String> sysMap = new HashMap<String, String>(); synchronized ( sysMap ) { sysMap.putAll( Collections.synchronizedMap( systemProperties ) ); aString = substituteWindows( aString, sysMap ); aString = substituteUnix( aString, sysMap ); aString = substituteHex( aString ); return aString; } }