Java tutorial
//package com.java2s; //License from project: Open Source License public class Main { /** * Find out how many cores are available to the JVM. * */ public static int getCoreCount() { int retval = Runtime.getRuntime().availableProcessors(); return retval; } }