Java programs that contain file paths, making them compatible on Windows and Linux

If your Java application makes use of files using paths, it’s best not to use slash “/” or backslash “\” hard coded in your source code. Use the following to ensure your program would work as expected on both Windows and Unix like systems.


Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.