Use File.toURI().toURL() instead of the deprecated File.toURL()