How we can get the processor name and registered to informations from PC? How is it possible through Java? I'm using windows OS.
Refer this image.
How we can get the processor name and registered to informations from PC? How is it possible through Java? I'm using windows OS.
Refer this image.
Generally, this is not possible to do in Java. You would have to go through an external program (see
ProcessBuilder
) or through a native library (written in for instance C++).You could do
to get the OS architecture though. This gives
"amd64"
on my machine.The page here lists a few other system properties too, but these seem to be VM specific though:
There is a library called Sigar out there that can do all those fancy things.
The sigar jar can be called 'standalone' to explore the system:
For this to work, you also need the respective .dll or .so in the classpath
In RHQ-project we use Sigar for many of those statistics - you can browse the code here.