CuckooChess: Java applets are not allowed to use System.getProperty().

This commit is contained in:
Peter Osterlund 2014-05-17 11:22:16 +00:00
parent 3bbfa49b01
commit 93d521c75e

View File

@ -31,11 +31,15 @@ public class ComputerPlayer implements Player {
static { static {
String name = "CuckooChess 1.13a9"; String name = "CuckooChess 1.13a9";
try {
String m = System.getProperty("sun.arch.data.model"); String m = System.getProperty("sun.arch.data.model");
if ("32".equals(m)) if ("32".equals(m))
name += " 32-bit"; name += " 32-bit";
else if ("64".equals(m)) else if ("64".equals(m))
name += " 64-bit"; name += " 64-bit";
} catch (SecurityException ex) {
// getProperty not allowed in applets
}
engineName = name; engineName = name;
} }