private static String readPasswordFile(String masterPassFilePath) throws Exception
{
File masterPassFile = new File(masterPassFilePath);
if (!masterPassFile.exists())
{
throw new Exception("["+masterPassFilePath+"] does not exist");
}
}
with the masterPassFile being equal to:
C:\temp\master.pass
which the returns true for the if statement throwing the error.
I’ve tried a bunch of different masterPassFilePath values
C://temp//master.pass
C:/temp/master.pass
etc etc
other info the master.pass is a dat file
I’m kinda stumped
EDIT:
To respond about permission, yup I can access it I have created it.
The backslash forwardslash issue. No matter what I have tried
masterPassFile has always been equal to:
C:\temp\master.pass
now why would this return true for
!.exists()
Under a modern Windows “C:/temp/master.pass” should work, if you have rights to the directory and file. With backslashes one needs to escape them in a java source: “C:\\temp\\master.pass“. Try another file (maybe locked).