public static ARCHType calculateArch ( ) { String osArch = System . getProperty ( "os.arch" ) ; osArch = osArch . toLowerCase ( Locale . ENGLISH ) ; if ( osArch . equals ( "i386" ) || osArch . equals ( "x86" ) || osArch . equals ( "i686" ) ) { return ARCHType . X86 ; } if ( osArch . startsWith ( "amd64" ) || osArch . startsWith ( "x86_64" ) ) { return ARCHType . X86_64 ; } if ( osArch . equals ( "ppc" ) || osArch . equals ( "powerpc" ) ) { return ARCHType . PPC ; } if ( osArch . startsWith ( "ppc" ) ) { return ARCHType . PPC_64 ; } if ( osArch . startsWith ( "sparc" ) ) { return ARCHType . SPARC ; } if ( osArch . startsWith ( "arm" ) ) { return ARCHType . ARM ; } if ( osArch . startsWith ( "mips" ) ) { return ARCHType . MIPS ; } if ( osArch . contains ( "risc" ) ) { return ARCHType . RISC ; } return ARCHType . UNKNOWN ; }
Calculates the current ARCHType