How to change the path so that it works with both Windows and Linux in java? : <p>I have a Java Project which currently supports Windows i.e I have hardcoded the windows C drive path at various places like <code>property file , hibernate config file ,log4J file , jsp file (For eg : "C:/software/server/webapps/ROOT/WEB-INF/xxx/file.log")</code>. Now I want to make the same code working on linux but the problem is file path which is hard-coded everywhere . How do I make the same code work for both Windows and Linux . What do I need to change in file path to make it work . </p>
