code: public static URL[] findClassPaths()
     {
        List<URL> list = new ArrayList<URL>();
        String classpath = System.getProperty("java.class.path");
        StringTokenizer tokenizer = new StringTokenizer(classpath, File.pathSeparator);
  
        while (tokenizer.hasMoreTokens())
        {
           String path = tokenizer.nextToken();
           File fp = new File(path);
           if (!fp.exists()) {
          	 throw new RuntimeException("File in java.class.path does not exist: " + 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
  
  @return