1

All along I have been pulling the remote files using the Runtime.exec() first by connecting the windows remote machine using "use net.." and then pulling the required files. Now I have a new mac machine and I am unable to connect to that windows remote using java code. I can access the server from finder window using below command:

smb://userName:password@ipAddress/pathToFileOnRemote

but when I run this command in java code using the Runtime.exec() method, I get an error stating No such file or directory.

Is there a different way to access the file on the windows remote from mac as compared to windows?

Jiri Tousek
  • 12,211
  • 5
  • 29
  • 43
pune06
  • 123
  • 2
  • 10
  • Use a Java Samba client. Your current approach is neither cross platform nor stable. See [this](https://stackoverflow.com/questions/7771888/access-to-file-using-java-with-samba-jcifs). – Boris the Spider Dec 18 '15 at 12:33
  • This works. Thanks for helping @BoristheSpider – pune06 Jan 04 '16 at 12:48

0 Answers0