getResource

fun getResource(clazz: Class<*>, path: String): URL?

Get resource as URL from the class loader of the given class, or from the class itself.

Return

Resource as URL, or null if it doesn't exist

Parameters

clazz

Class to get the resource from

path

Path to the resource. If it doesn't start with a slash, one will be added.