Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
//License from project: Apache License 

public class Main {

    public static String getCpuInfo() {
        try {
            String arc = System.getProperty("os.arch").toUpperCase();
            if (arc.startsWith("ARM")) {
                arc = "ARM";
            } else if (arc.startsWith("MIPS")) {
                arc = "MIPS";
            } else if (arc.startsWith("X86") || arc.endsWith("86")) {
                arc = "X86";
            } else {
                arc = "ARM";
            }
            return arc;
        } catch (Exception e) {
            return "ARM";
        }
    }
}