I need to search for file in the network and check if the file exist or not, I use this code:
File listOfFiles = new File ("\\\\server\\share\\TEST\\file.xml");
if (listOfFiles.exists() && listOfFiles.isFile()){
// ...
}
but it seems that the user didn't have permission to access the network driver. I need to send the user name and password for the user who have rights to this driver, but I don't know how.