Skip to content

Instantly share code, notes, and snippets.

@raytrask
Created June 4, 2014 02:01
Show Gist options
  • Select an option

  • Save raytrask/b280ba6713a4eeed5f84 to your computer and use it in GitHub Desktop.

Select an option

Save raytrask/b280ba6713a4eeed5f84 to your computer and use it in GitHub Desktop.
reading the java classpath at runtime
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