pf = new File(targetdir, filename);
pf = new File(getSourceDir(), filename);
  protected void initProperties(String propertyFilenames) {    pgParser = new PGParser(isVerbose);    int i;    int parsePos = 0;    String filename;    while (parsePos < propertyFilenames.length()) {      if ((i = propertyFilenames.indexOf(',', parsePos)) != -1) {        filename = propertyFilenames.substring(parsePos, i).trim();        parsePos = ++i;      } else {        filename = propertyFilenames.substring(parsePos).trim();        parsePos = propertyFilenames.length();      }      InputStream stream = null;      try {        if (filename.equals("-")) {          debug("Reading properties from standard input.");          stream = new java.io.DataInputStream(System.in);        } else if (filename.indexOf('/') == -1) {          debug("Reading \""+filename+"\".");          File pf;          int p;          // must be a '/', NOT filesystem dependent!          if ((p=filename.lastIndexOf('/'))!=-1) {            pf = new File(filename);          } else {            pf = new File(targetdir, filename);          }          stream = new FileInputStream(pf);        } else {          debug("Using ClassLoader to read \""+filename+"\".");          stream = getClass().getClassLoader().getResourceAsStream(filename);        }        if (stream != null) {          pgParser.parse(stream);          stream.close();        } else {          System.err.println("Could not find \""+filename+"\" with "+                             ((filename.indexOf('/')==-1)?"file":"Resource")+                             " IO");        }      } catch (Exception e) {        System.err.println("targetdir="+targetdir);        System.err.println("Unable to parse " + filename);        System.err.println("Caught: "+e);        e.printStackTrace();      }    }  }