Re:Show HN: Open-sourced my Java chess AI high school project
by tba on Saturday April 20, 2013 @05:27PM
(#5582873)
Cool project! Anyone trying to run it on *nix will need to open Main.java and replace all instances of the windows-specific file separator "\\" with "/".
[ Parent
| on HN ]
Re:Show HN: Open-sourced my Java chess AI high school project
by jared314 on Saturday April 20, 2013 @06:22PM
(#5583052)
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#s...
Re:Show HN: Open-sourced my Java chess AI high school project
by madsravn on Saturday April 20, 2013 @07:24PM
(#5583219)
For future reference, just using slash ("/") will work for both Windows and Unix systems (linux and OSX)
Re:Show HN: Open-sourced my Java chess AI high school project
by jared314 on Saturday April 20, 2013 @08:06PM
(#5583300)
Yes, Windows treats both "/" and "\" as separators. Just make sure you handle the edge cases.
http://stackoverflow.com/questions/4845866/java-on-windows-p...