Could someone point me to or give me a good explanation/example of dealing with the location of files within the filesystem. I need to be able to do this on different OS's, but without having to explicitly do the same action 2 different ways and use an if statement to choose every time. I have looked at the java docs on File but it didn't get me very far. I also looked at the Java Tutorial, but it didn't help much either I need to be able to:
findout what the working directory is
change the working directory to the location of my program if need be. Once there, I could probably solve the next issue.
store a set of resource directories between program sessions. I suppose this could be done with a text file, but I have to know the path to that file so I can open it.
avoid hardcoding paths into my code.
These are the things I am having a hard time figuring out. Any help with some or all of them would be appreciated. Thanks, Chris
Being a smart alec beats the alternative. This tiny ad knows what I'm talking about:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop