Replace deprecated toURL() with toURI().toURL() as per the JavaDoc