docs: public static String getPathFromURL(URL url) {
          URI uri;
          try {
              uri = url.toURI();
          } catch (URISyntaxException e) {
              // this will probably not happen since the url was created
              // from a filename beforehand
              throw new InvalidCodeLocation(e.toString());
          }
  
          if(uri.toString().startsWith("file:") || uri.toString().startsWith("jar:")) {
              return removeStart(uri.getSchemeSpecificPart(),"file:");
          } else {
              // this is wrong, but should at least give a
              // helpful error when trying to open the file later
              return uri.toString();
          }
      }