Forum Stats

  • 3,875,351 Users
  • 2,266,904 Discussions
  • 7,912,167 Comments

Discussions

Reading .txt file on Windows Server 2008

1006924
1006924 Member Posts: 2
edited May 3, 2013 7:15AM in Java Desktop Applications
I have a Java 7 application that we distribute, and it reads configurations from a .txt file distributed with it, in the same directory as the .jar file. On Windows 7, windows XP, Windows 8, this works fine, but on our server, running Windows Server 2008, this fails. It is a simple check that fails:

Path p = Paths.get("config.txt");
if(Files.isReadable(p))

This will not work on Windows Server 2008 r2. It suspect that it somehow hasn't got read permissions, but I'm not sure.

It also fails if the absolute path is specified.

Answers

This discussion has been closed.