Create Path from URI
import java.net.URI; import java.nio.file.Files; import java.nio.file.Paths; public class Test { public static void main(String[] args) throws Exception{ Files.delete(Paths.get(new URI("file:///tmp.txt"))); } }