Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;

public class Main {
    public static final int ARC_JRE_32 = 32;
    public static final int ARC_JRE_64 = 64;

    /**
     * Indetifca em qual arquitetura a JRE esta executando
     * @return
     */
    public static int getArchitecture() {
        String architecture = System.getProperty("sun.arch.data.model");
        if (architecture.equalsIgnoreCase("64")) {
            return ARC_JRE_64;
        } else {
            return ARC_JRE_32;
        }
    }
}