class DisplayJavaBitness
{
    public static void main(String args[])
    {
	boolean verbose = false;

	if (args.length == 1) {
	    String arg0 = args[0];

	    if (arg0.equals("-v") || arg0.equals("-verbose") || arg0.equals("--verbose")) {
		verbose = true;
	    }
	}

	// Testing bitness of JVM
	//   https://www.baeldung.com/java-detect-jvm-64-or-32-bit	
       
	    
	boolean is_64bit = com.sun.jna.Platform.is64Bit();
	
	String bitness_str = (is_64bit) ? "64" : "32";

	if (verbose) {
	    System.out.println("Bitness: " + bitness_str + "bit");
	}
	else {
	    System.out.println(bitness_str);
	}
    }
}

