I am, as stated in the headline, trying to read a file from a path given to me as a String, located in a Tomcat-Context file.
The path starts with "///C:". On Unix systems it would start with "/C:".
As of now I am trying to do as follows:
MyPath = Paths.get("///C:" + filename);
byte encoded = Files.readAllBytes(MyPath);
String JsonString = new String(encoded);
My mistake was, that I did not treat the URL I received as an URL. The following code snippet did the trick:
MyPath = Paths.get( new URL("///C:" + filename).toURI() );
It works on both systems. I think Paths.get() understands the "///" only in URLs.