How To Print Out The Current Project Classpath?
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | package com.mkyong.io; import java.net.URL; import java.net.URLClassLoader; public class App{ public static void main (String args[]) { ClassLoader cl = ClassLoader.getSystemClassLoader(); URL[] urls = ((URLClassLoader)cl).getURLs(); for(URL url: urls){ System.out.println(url.getFile()); } } } |
Labels: Maven
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home