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.
Message was edited by:
There's a system property whose name is something like "user.home". If you write a little program that dumps all the system properties to System.out you will recognize it. (I have that program but I would have to spend 5 minutes loading my IDE to run it. So I will let you write it instead.)