code: public static InputStream readFile(String filename, ClassLoader classLoader) throws IOException {
          // first option: specified through system property
          String configDir = System.getProperty(PropertyManager.MDW_CONFIG_LOCATION);
          File file;
          if (configDir == null)
              file = new File(filename);  // maybe fully-qualified file name
          else if (configDir.endsWith("/"))
              file = new File(configDir + filename);
          else
              file = new File(configDir + "/" + filename);
  
          // next option: etc directory
          if (!file.exists())
              file = new File("etc/" + filename);
  
          if (file.exists())
              return new FileInputStream(file);
  
          // not overridden so load from bundle classpath
          String path = BUNDLE_CLASSPATH_BASE + "/" + filename;
          return classLoader.getResourceAsStream(path);
      }
docs: Read file according to the follow precedence:
  - From directory specified by system property mdw.config.location
  - From fully qualified file name if mdw.config.location is null
  - From etc/ directory relative to java startup dir
  - From META-INF/mdw using the designated class loader