|
Yo Yo... Anyone have an idea on how to get the CPU informatin in Java? I'm working on a benchmark program and I need to figure out how to get system information about the computer. I know how to get the computer name: I accomplished that by using:
InetAddress.getLocalHost().getHostName()
It returns a string to be used in a label or whatever.
So does anyone know of a way to get the CPU information about a computer? peace...
.:[VS]:.
|
|
|
|
|
It is not possible without the use of native code
and I think it is not part of the Java API.
what you can do is
use information provided by particular OS.
Use Runtime.exec() For executing particular code
on the OS
Any other library or code which you can use
Try this code
System.getProperty("os.arch")
|
|
|
|
|
|
|
|