Here you can find the source of findClassPaths()
@SuppressWarnings("deprecation") public static List<URL> findClassPaths()
//package com.java2s; import java.io.File; import java.net.MalformedURLException; import java.net.URL; import java.util.ArrayList; import java.util.List; import java.util.StringTokenizer; public class Main { @SuppressWarnings("deprecation") public static List<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());// w ww .j av a 2 s .c om } catch (MalformedURLException e) { throw new RuntimeException(e); } } return list; } }