Java tutorial
//package com.java2s; public class Main { private static boolean nosandbox; public static String getOSString() { String patch; if (checkForNoSandbox()) { patch = System.getProperty("sun.os.patch.level") + " (" + System.getProperty("sun.arch.data.model") + "bit)"; } else { patch = "?"; } return System.getProperty("os.name") + " " + System.getProperty("os.version") + " " + patch + " on " + System.getProperty("os.arch"); } public static boolean checkForNoSandbox() { return nosandbox; } }