Mihaela Hetea wrote:On Windows, the method Paths.get(URI) doesn't throw a RuntimeException if the URI is not absolute.
Finally got to try it on Windows.
This throws an exception on both Windows and Mac:
This one throws an Exception on Mac, but not Windows:
I'll note this.
Mihaela Hetea wrote:Also the examples with the http schema throw exception .
From the implementation of getPath(URI) it seems that the file:// schema is taken by default, whereas for the others the method is called, which on my computer returns file and jar. Does this mean that in the context of Path class only URI with schema file can be used or other providers can be installed? (like http for example)
It throws an exception on Mac too. Since http isn't on the exam, that was just meant to show it exists. Not work.