How can I find the number of cores available to my application from within Java code?
Printable View
How can I find the number of cores available to my application from within Java code?
Look at the Runtime class's methods.
Finding Number of Cores in Java
int cores = Runtime.getRuntime().availableProcessors();
If cores is less than one, either your processor is about to die, or your JVM has a serious bug in it, or the universe is about to blow up.
Again, why are you reposting old threads from StackOverflow. This is the third one now.
https://stackoverflow.com/questions/...-cores-in-java