Skip to content

com.github.manosbatsis.corda.testacles.containers.util / JarUtil / getClassnameUrl

getClassnameUrl

fun getClassnameUrl(classname:String):URL?

Gets the base location of the given classname.

If the class is directly on the file system (e.g., “/path/to/my/package/MyClass.class”) then it will return the base directory (e.g., “file:/path/to”).

If the class is within a JAR file (e.g., “/path/to/my-jar.jar!/my/package/MyClass.class”) then it will return the path to the JAR (e.g., “file:/path/to/my-jar.jar”).

Parameters

classname - The class qualified name whose location is desired.