Is there a way to find a properties file from a class no matter where it is on the disk? I know you can use a getProperty() method to find the jdk ext directory and I could put my properties file there. I have a properties file which holds locations of other files. It would seem I'd need a properties file to hold the location of the properties file, and another properties file to hold the location of that properties file and so on . . . I'd like to just name the file in the class, and not worry about which directory it's located in. Thanks. Paul
Depends on how flexible you want to be. You could use the java.io.File class to walk the directory structure of the disk looking for the file, but I don't recommend that Instead, I just put my properties in classpath and don't worry about the directory. Loading the Properties through PropertyResourceBundle.getBundle("myPropertiesFile") uses the classpath, so as long as my file is in the classpath I don't worry about it. If I don't have a resource in the classpath, I don't have the resource. (Of course, I'm looking at moving to Preferences anyway...)
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com