Created
April 19, 2018 10:48
-
-
Save ansig/efb4ab2b2afe673f4cd81974251a37b4 to your computer and use it in GitHub Desktop.
Print classpath in Groovy for debugging
This file contains 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) { | |
println "=== ${classLoader} ===" | |
if (classLoader instanceof java.net.URLClassLoader) { | |
classLoader.getURLs().each {url-> | |
println "- ${url.toString()}" | |
} | |
} | |
if (classLoader.parent) { | |
printClassPath(classLoader.parent) | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment