code: public static File[] parsePath(final String path, final String delim) {
      final Vector libpaths = new Vector();
      int delimPos = 0;
      for (int startPos = 0; startPos < path.length(); startPos = delimPos + delim.length()) {
        delimPos = path.indexOf(delim, startPos);
        if (delimPos < 0) {
          delimPos = path.length();
        }
        //
        // don't add an entry for zero-length paths
        //
        if (delimPos > startPos) {
          final String dirName = path.substring(startPos, delimPos);
          final File dir = new File(dirName);
          if (dir.exists() && dir.isDirectory()) {
            libpaths.addElement(dir);
          }
        }
      }
      final File[] paths = new File[libpaths.size()];
      libpaths.copyInto(paths);
      return paths;
    }
docs: Parse a string containing directories into an File[]
  
  @param path
  path string, for example ".;c:\something\include"
  @param delim
  delimiter, typically ; or :