How to load files on multiple platforms properly using Java? [duplicate]
问题 This question already has answers here : Platform independent paths in Java (8 answers) Closed 4 months ago . I have a java swing database application which needs to be run on Windows and Linux. My database connection details are stored in a XML file and I load them. This application can load this properties on Linux properly but it is not working on Windows. How do I load files on multiple platforms properly using Java? This is the code: PropertyHandler propertyWriter = new PropertyHandler()