Created
June 4, 2014 02:01
reading the java classpath at runtime
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def printClassPath(){ | |
ClassLoader cl = ClassLoader.getSystemClassLoader(); | |
URL[] urls = ((URLClassLoader)cl).getURLs(); | |
for(URL url: urls){ | |
System.out.println(url.getFile()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment