How to access shared WIndow folders from MAC using Java API

Joined
May 30, 2011
Messages
2
Reaction score
0
Points
1
Hello,
I am literally crumbling to create or do any file IO operation in a shared Window(Server) directory from my MAC. I use smb://server-ip/shared-directory to access file/folder from my MAC. However using the same notation in file IO API does not work and it all gives null pointer exception.
String uri = "smb://server/shared1/subm=folder"; // also tried with file:///server, smb://DOMAIN;user@server/shared1 etc...
File file = new File(uri);
System.out.println(file.list()); //This always gives null


This is really critical for me and would appreciate your help.
 

Shop Amazon


Shop for your Apple, Mac, iPhone and other computer products on Amazon.
We are a participant in the Amazon Services LLC Associates Program, an affiliate program designed to provide a means for us to earn fees by linking to Amazon and affiliated sites.
Top