code: public static URL[] findClassPaths(String... paths)
     {
        ArrayList<URL> list = new ArrayList<URL>();
  
        String classpath = System.getProperty("java.class.path");
        StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
        for (int i = 0; i < paths.length; i++)
        {
           paths[i] = paths[i].trim();
        }
  
        while (tokenizer.hasMoreTokens())
        {
           String path = tokenizer.nextToken().trim();
           boolean found = false;
           for (String wantedPath : paths)
           {
              if (path.endsWith(File.separator + wantedPath))
              {
                 found = true;
                 break;
              }
           }
           if (!found) {
          	 continue;
           }
           File fp = new File(path);
           if (!fp.exists()) {
          	 throw new RuntimeException("File in java.class.path does not exists: " + fp);
           }
           try
           {
              list.add(fp.toURL());
           }
           catch (MalformedURLException e)
           {
              throw new RuntimeException(e);
           }
        }
        return list.toArray(new URL[list.size()]);
     }
docs: Uses the java.class.path system property to obtain a list of URLs that represent the CLASSPATH
  <p/>
  paths is used as a filter to only include paths that have the specific relative file within it
  
  @param paths comma list of files that should exist in a particular path
  @return