Of course you shouldn't hard code the location of the file in the source code. In fact, it's a very bad idea. You can put the information on where your XML file is in the configuration file, e.g. in the
Java properties file.
You can also put it in the System property. So you when you run your application, it's gonna be something like this:
java -jar -Dxml.file.path=C:/Projects/YourXML.xml YouJar.jar
There are actually many ways to achieve this.
Hope this helps.
[ October 19, 2007: Message edited by: Freddy Wong ]