Convert URL to AbsolutePath
If you were interested in getting Path
from URL, you can do:
Path p = Paths.get(url.toURI());
URL url = getClass().getResource("/getresources/test.txt");
File f = new File(url.toURI());
If you were interested in getting Path
from URL, you can do:
Path p = Paths.get(url.toURI());
URL url = getClass().getResource("/getresources/test.txt");
File f = new File(url.toURI());