This discussion is archived
4 Replies Latest reply: Mar 22, 2007 3:44 PM by 807606 RSS

Unix home directory question using Java

807606 Newbie
Currently Being Moderated
Hi,

I have been scratching my head on this for a few days now and can't come up with a solution, so I am seeking help. I have a GUI app, and I want to be able to write to a file in my home dir. If i hard code this in the application, of course it works, meaning I say write to /home/users/dave, but the idea is that other users will be running this app besides me and I want them to be able to save to their OWN home directory, but don't know of a way to specify this in Java.

I have tried the ~ that didn't work, I have tried the $HOME and that didn't work, so any ideas would be appreciated. This is saving to a UNIX system, user's home dir.

Thanks

Dave

Message was edited by:
ddavtian