tags:

views:

78

answers:

3

I want to know what type of CPU (Intel Pentium V, AMD Athlon Barton etc.) is built in and which features it has (SSE, MMX, Stepping etc.). Is there some ready-made Java-library for this?

A: 

The JVM does this internally so you don't need to know. There is no way in Java to take advantage of this information other than what the JVM does for you already.

Why do you want to know?

Peter Lawrey
I want to load some special libraries based on CPU type.
qbi
+1  A: 

If you are using Windows you could use Jawin to access the Win32 API.

YWE
I'm especially interested in a solution for Windows, GNU/Linux and FreeBSD.
qbi
I guess if your OS is GNU/Linux you could try to parse "/proc/cpuinfo". If it is FreeBSD (or Linux) you could try to parse the output of "dmesg".
YWE
IMHO it would be better to look at CPUID: http://en.wikipedia.org/wiki/CPUID
qbi
+1  A: 

Yes, for Windows, the combination Jawin and WMI could be the solution. Here is a good article. Unfortunately in German only, but maybe the example code helps.

gemue