hardware information

In a java application I need to retrieve hardware information (cpu type and freq, hdd manufacturer, network interfaces, the like).

I know this is not possible using pure java, olny through JNI or some other trick.

Is there an existing API/JSR for this ? do I have to write my own dll ? is there a Java-only solution ? what's the easiest way ?

Thanks
hapciuAsked:
Who is Participating?
 
kawasConnect With a Mentor Commented:
http://www.devarticles.com/c/a/JavaScript/Retrieving-More-Hardware-Information-With-Internet-Explorer-and-JavaScript/
Gets hardware information using javascript. I realize that you asked how to do it in java, but if you look at the javascript, they are using activeX.

if nothing else, you could embed activeX in your java app.
0
 
hapciuAuthor Commented:
how would i do that ? isn't there any other simpler solution ... ?
0
 
rajesh_balaCommented:
Hey Hapciu,

I would suggest you refer JRockit JVM (MBeans). Its the BEA JVM and it has management mbeans, which can retrieve the information you asked for.

Disadvantage is that, these management mbeans are specific to JRockit JVM and is not available in any other JVM mbeans.

~Rajesh.B
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
rajesh_balaCommented:
http://dev2dev.bea.com/pub/a/2005/12/jrockit-mission-control.html

Try referring some of the mbeans there. Or you can use some of the mbean browser and view the appropriate MBean.
0
 
Mayank SAssociate Director - Product EngineeringCommented:
I would suggest using some JNI option which can be deployed on mutliple JVMs.
0
 
rajesh_balaCommented:
Good idea. However JNI is cumbersome and is very much similar to what JRockit offers. (It internally uses .dll or .so libraraies to get the details]
0
 
Mayank SConnect With a Mentor Associate Director - Product EngineeringCommented:
Yes internally it has to use JNI for this. But if management mbeans are specific to JRockit JVM, then its better to write your own. Try www.jniwrapper.com to abstract some JNI intricacies.
0
All Courses

From novice to tech pro — start learning today.