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
The issue isn't easy to solve because of the fundamental differences in the file systems. (Edit: Ignore me, I'm clearly on Cough Medicine. As Djon pointed out below).
Windows\Uses\Folder\Structures\Like\This.txt
Linux/Uses/Folder/Structures/Like/This.txt
So, the only way to handle this accordingly is to detect the operating system it runs on first, and then build your file paths accordingly.
See this question for more details:
How do I programmatically determine operating system in Java?