打印当前的所有classpath


 public static void main (String args[]) {
 
        ClassLoader cl = ClassLoader.getSystemClassLoader();
 
        URL[] urls = ((URLClassLoader)cl).getURLs();
 
        for(URL url: urls){
        	System.out.println(url.getFile());
        }
 
   }



参考 http://www.mkyong.com/java/how-to-print-out-the-current-project-classpath/

你可能感兴趣的:(classpath)