Solved

hardware information

Posted on 2006-06-17
10
1,191 Views
Last Modified: 2008-02-01
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
Comment
Question by:hapciu
10 Comments
 
LVL 13

Accepted Solution

by:
kawas earned 43 total points
ID: 16929787
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
 

Author Comment

by:hapciu
ID: 16929961
how would i do that ? isn't there any other simpler solution ... ?
0
 
LVL 10

Expert Comment

by:rajesh_bala
ID: 16930290
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
Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

 
LVL 10

Expert Comment

by:rajesh_bala
ID: 16930295
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
 
LVL 10

Assisted Solution

by:rajesh_bala
rajesh_bala earned 41 total points
ID: 16930299
0
 
LVL 30

Expert Comment

by:Mayank S
ID: 16934133
I would suggest using some JNI option which can be deployed on mutliple JVMs.
0
 
LVL 10

Expert Comment

by:rajesh_bala
ID: 16935818
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
 
LVL 30

Assisted Solution

by:Mayank S
Mayank S earned 41 total points
ID: 16939875
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

Featured Post

Networking for the Cloud Era

Join Microsoft and Riverbed for a discussion and demonstration of enhancements to SteelConnect:
-One-click orchestration and cloud connectivity in Azure environments
-Tight integration of SD-WAN and WAN optimization capabilities
-Scalability and resiliency equal to a data center

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Android studio getdrawable(int) is deprecated 4 116
Way to decrease size of apk file 9 86
pagenation logic how it is working in my code 1 53
jsp error 6 25
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question