{
// get the class's package
val myPackage = pkg.getName();
// convert package to class path
String myClasspath = CONSTANT.FORWARD_SLASH + myPackage.replace(CONSTANT.DOT, CONSTANT.FORWARD_SLASH);
if (!myClasspath.endsWith(CONSTANT.FORWARD_SLASH))
myClasspath += CONSTANT.FORWARD_SLASH;
// append filename to class path
val resourceClasspath = myClasspath + filename;