I am working on a Java project which needs to work on both Mac OS X and Windows. There are many variables which store paths to various resources and files.
Is the best way to deal with them, putting them all in a separate class (say, Constants) and maintain two branches for the file in SVN ?
Update : It is not just an issue of path separator character (forward vs backward slash). The directory structure is different for both systems. On Mac, I keep my resources in various directories. Say, images somewhere, log files somewhere. On Windows, I might use totally different directories. It is not necessary for all the directories to be part of one tree (i.e. they are not in different directories under one main directory called 'resources' or something). This is not necessarily a bad programming practice. Sometimes you need to access system files or system-wide common directories and you just can't put them under one supreme directory