protected URL getUrlFromPath(String path, RuntimeContext extensionContext) {
   if (path == null) {
     return null;
   }
   URL url = null;
   try {
     url = new URL(path);
   } catch (MalformedURLException e) {
     url = extensionContext.getLocalResource(path);
     if (url == null) {
       url = extensionContext.getResource(path);
     }
   }
   return url;
 }
 public Script getScript() throws Exception {
   if (rc != null) {
     URL url = rc.getBundle().getEntry(script);
     if (url == null) {
       // if not found using bundle entries try using classloader
       // in a test environment bundle entries may not work
       url = rc.getResource(script);
       if (url == null) {
         throw new Exception("Script Not found: " + script);
       }
     }
     return Script.newScript(url);
   } else {
     return Script.newScript(script);
   }
 }