I have a xml file located in D:\\XML\\RequestXML
and I am reading xml file in this folder from a FileReader
. In my program I hard coded the file pa
If you know the current working directory (test it with:
System.out.println(new File(".").getAbsolutePath());
you can hardcode a relative directory like ../../XML/RequestXML
For the record: although this may help, I still believe you should try to solve this with a configuration parameter or by loading it as a resource available in the classpath.