Listing 2: The method getResourceString from MLUtils.java

public static String getResourceString(String key) {
  if (key == null || key.equals("")) return key;
  else {
    String mainClass = System.getProperty("MainClassName");
    if (mainClass != null) {
      return getResourceString(key, "resources/" + mainClass);
    }
    return getResourceString(key, "resources/ML");
  }
}
— End of Listing —