public static String getArchName()
    {
        // if running Linux on ARM, need to determine ABI of JVM
        String osArch = System.getProperty("os.arch");
        if (osArch.startsWith("arm") && System.getProperty("os.name").contains("Linux")) {
            String javaHome = System.getProperty("java.home");
            try {
                // determine if first JVM found uses ARM hard-float ABI
                String[] cmdarray = {"/bin/sh", "-c", "find '" + javaHome +
                        "' -name 'libjvm.so' | head -1 | xargs readelf -A | " +
                        "grep 'Tag_ABI_VFP_args: VFP registers'"};
                int exitCode = Runtime.getRuntime().exec(cmdarray).waitFor();
                if (exitCode == 0) {
                    return "armhf";
                }
            }
            catch (IOException e) {
                // ignored: fall back to "arm" arch (soft-float ABI)
            }
            catch (InterruptedException e) {
                // ignored: fall back to "arm" arch (soft-float ABI)
            }
        }
        else {
            String lc = osArch.toLowerCase(Locale.US);
            if (archMapping.containsKey(lc)) {
                return archMapping.get(lc);
            }
        }
        return translateArchNameToFolderName(osArch);
    }