Here you can find the source of getFilesFromClassPath(String classpath)
public static List<File> getFilesFromClassPath(String classpath)
//package com.java2s; //License from project: Apache License import java.io.File; import java.util.ArrayList; import java.util.List; public class Main { public static List<File> getFilesFromClassPath(String classpath) { File dir = new File(classpath); return getFilesFromDir(dir); }//from w ww.j ava 2 s .c o m public static List<File> getFilesFromDir(File dir) { List<File> files = new ArrayList<File>(); for (File f : dir.listFiles()) { if (!dir.exists()) continue; if (f.isDirectory()) { List<File> _files = getFilesFromDir(f); files.addAll(_files); continue; } files.add(f); } return files; } }