private String[] expandRuntimeTokens(String[] pathlist){
  final String[] processed=new String[pathlist.length];
  Properties envProperties=loadEnvPropertyFile();
  String playerglobalHome=envProperties != null ? envProperties.getProperty("env.PLAYERGLOBAL_HOME",System.getenv("PLAYERGLOBAL_HOME")) : System.getenv("PLAYERGLOBAL_HOME");
  if (playerglobalHome == null)   playerglobalHome=PLAYERGLOBAL_HOME_TOKEN;
  String airHome=envProperties != null ? envProperties.getProperty("env.AIR_HOME",System.getenv("AIR_HOME")) : System.getenv("AIR_HOME");
  if (airHome == null)   airHome=AIR_HOME_TOKEN;
  for (int i=0; i < pathlist.length; i++) {
    processed[i]=StringUtils.substitute(pathlist[i],PLAYERGLOBAL_HOME_TOKEN,playerglobalHome);
    processed[i]=StringUtils.substitute(processed[i],AIR_HOME_TOKEN,airHome);
  }
  return processed;
}

private String [ ] expandRuntimeTokens ( String [ ] pathlist ) { final String [ ] processed = new String [ pathlist . length ] ; Properties envProperties = loadEnvPropertyFile ( ) ; String playerglobalHome = envProperties != null ? envProperties . getProperty ( "env.PLAYERGLOBAL_HOME" , System . getenv ( "PLAYERGLOBAL_HOME" ) ) : System . getenv ( "PLAYERGLOBAL_HOME" ) ; if ( playerglobalHome == null ) playerglobalHome = PLAYERGLOBAL_HOME_TOKEN ; String airHome = envProperties != null ? envProperties . getProperty ( "env.AIR_HOME" , System . getenv ( "AIR_HOME" ) ) : System . getenv ( "AIR_HOME" ) ; if ( airHome == null ) airHome = AIR_HOME_TOKEN ; for ( int i = 0 ; i < pathlist . length ; i ++ ) { processed [ i ] = StringUtils . substitute ( pathlist [ i ] , PLAYERGLOBAL_HOME_TOKEN , playerglobalHome ) ; processed [ i ] = StringUtils . substitute ( processed [ i ] , AIR_HOME_TOKEN , airHome ) ; } return processed ; }
replaces instances of { playerglobalhome } and { airhome } . values can come from either . . / env . properties ( relative to jar file ) or environment variables . the property file values have precedence . the pairs are env . playerglobal_home and playerglobal_home , and , env . air_home and air_home .
