Pobierz ścieżkę pliku Java
File file = new File("yourfileName");
String path = file.getAbsolutePath();
Famous Flamingo
File file = new File("yourfileName");
String path = file.getAbsolutePath();
String absolutePath = FileSystems.getDefault()
.getPath(mayBeRelativePath)
.normalize()
.toAbsolutePath()
.toString();