0

Either

File share = new File("//myserver/folder");

or

File share = new File("\\\\myserver\\folder");

String shareURI = share.toURI().toString();
System.out.println(shareURI);

I'd have expected

file://myserver/folder

but got

file:////myserver/folder

Java 8 on Windows.

Michi
  • 487
  • 5
  • 20
  • 1
    https://stackoverflow.com/questions/1878024/file-uris-and-slashes This might be of help – Wep0n Dec 12 '17 at 13:19
  • Thanks! "Java is wrong" was my first thought, which I wouldn't dare to believe without asking other people. – Michi Dec 12 '17 at 13:27

0 Answers0