4 ms·
It should be using the java.io.File.separator[0] constant for platform independence. [0] http://docs.oracle.com/javase/6/docs/api/java/io/File.html#separator h
by jared314 14y ago
It should be using the java.io.File.separator[0] constant for platform independence.
[0] http://docs.oracle.com/javase/6/docs/api/java/io/File.html#separator http://docs.oracle.com/javase/6/docs/api/java/io/File.html#s...
- madsravn 14y agoFor future reference, just using slash ("/") will work for both Windows and Unix systems (linux and OSX)
- jared314 14y agoYes, Windows treats both "/" and "\" as separators. Just make sure you handle the edge cases. http://stackoverflow.com/questions/4845866/java-on-windows-prevent-slash-in-file-name-from-acting-as-a-seperator http://stackoverflow.com/questions/4845866/java-on-windows-p...