// Helper String getArch() { return System.getProperty("os.arch"); } boolean is32bit() { // There is also "x86_64" which is 64-bit return getArch().equalsIgnoreCase("x86"); } boolean is64bit() { // Finds "amd64" or "x86_64" return getArch().contains("64"); }
Programming Tips - Java: See if I am running on a 32- or 64- bit system
Date: 2016sep15
Language: Java
Q. Java: See if I am running on a 32- or 64- bit system
A. These function do the trick: