Code: Select all
Path p1 = Paths.get("photos\\goa");
Path p2 = Paths.get("\\index.html");
Path p3 = p1.relativize(p2);
System.out.println(p3);
Code: Select all
../\index.html
From my point of view, the path "\\index.html" does not contain a root element. Only if I change this path to "/index.html" than I get this Exception.