Working with Files in Java
From my local machine I am running a Java code which fetches values from DB and writes it into a TXT file and save the TXT file into a different server say 'A'. This part is working fine if I run the Java code from my local machine.
I tried deploying the same Java code into a differnet server say 'B' and executed it, but it failed. The code is trying to save the TXT file into a unknown path which is not specified in the code rather than saving in the server 'A'.
Please note, Server 'B' is having write access on server 'A' and I have given the absolute path of server 'A' in code.
Can someone tell me why it is trying to save the TXT file to a path which is not specified in code?
I am getting the following error message :
java.io.FileNotFoundException: \\...\...\...(unknown path)
(Access is denied)
Plz assist.