I am trying to read a remote file in java
File f = new File("//192.168.1.120/home/hustler/file.txt");
The remote machine needs a Username and Password to allow me to access the file.
Is there a way I could pass the parameters through the java code and read the file?
Here is the code, I’ve written and it is working Perfectly.
Now you can use the file to perform the required operations. Something like…