I am receiving a FileNotFoundException with the following code:
File dataFile = new File("\\xx.xxx.xx.xxx\PATH\TO\FILE.xml");
if(dataFile.isFile())
{
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
DocumentBuilder db = dbf.newDocumentBuilder();
// Printing out File displays full path
Document doc = db.parse(dataFile);
}
This is resulting in a FileNotFoundException: \PATH\TO\FILE.xml. It appears to have truncated the IP address out of the path. I have checked that the path name does not include any spaces and if I print out the path of the File object before parsing, the full path is displayed. Any ideas?
I am running Java 1.5_14.