code: protected static String getHomeDir(String[] args) {
          if (System.getenv(HOME_DIR) == null) {
              if (args.length > index) {
                  return args[index++];
              } else {
                  return ".";
              }
          } else {
              return System.getenv(HOME_DIR);
          }
      }
docs: Gets the Media Server Home directory.
  
  @param args the command line arguments
  @return the path to the home directory.