http://superuser.com/questions/371513/how-to-tell-full-path-of-file-on-mac
http://stackoverflow.com/questions/5972026/path-to-file-on-a-mac-filenotfoundexception
I used this and it works. FileWriter w = new FileWriter("//Users//tu//Desktop//test1//temp.txt");