class OsBitType{ public static void main(String args[]){ String arch1 = System.getenv("PROCESSOR_ARCHITECTURE"); String arch2 = System.getenv("PROCESSOR_ARCHITEW6432"); String realArch; realArch = arch1.endsWith("64") || arch2 != null && arch2.endsWith("64") ? "64" : "32"; System.out.println(realArch); } }
Sample
Output
64
No comments:
Post a Comment