Relates :
|
|
Relates :
|
|
Relates :
|
See: Exception in thread "main" java.lang.IllegalArgumentException: URI has an authority component at java.io.File.<init>(File.java:340) caused by code: File f = new File ("//SERVER/MyDocuments/USER/DIR/"); new File (f.toURI().toURL().toURI()); /* file://SERVER/MyDocuments/USER/DIR */ but following code is OK: new File (f.toURI()); /* file:////SERVER/MyDocuments/USER/DIR */ Its fragile, not mentioning that URI.normalize () complicates it even more (file:/SERVER/MyDocuments/USER/DIR)
|