• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1199
  • Last Modified:

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
0
hapciu
Asked:
hapciu
3 Solutions
 
kawasCommented:
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
Upgrade your Question Security!

Your question, your audience. Choose who sees your identity—and your question—with question security.

 
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 SAssociate 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now