The File constructor taking an URI in combination with URL#toURI() should work:
URL url = getItSomehow();
File file = new File(url.toURI());
The File constructor taking an URI in combination with URL#toURI() should work:
URL url = getItSomehow();
File file = new File(url.toURI());