Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hardware Detection

Status
Not open for further replies.

bryantstevens

Programmer
May 10, 2002
2
US
Is there a way to detect and determine the status of installed hardware, i.e. ethernet cards, video card, etc.

I am editing/upgrading a program that needs to run a system health check and want to make sure various hardware components are installed and operating. The program currently parses an output file from the msinfo command, searching for a text string match of the exact name hard-coded into the program. This works great if you already know the hardware configruation. I am trying to make the program work with multiple hardware configs without knowing in advance what cards may be installed.

I am not a Java progammer! Any help would be greatly appreciated...
 
The standard Java API cannot interface with hardware directly because Java is OS independant, and considering that OS's interact with hardware differently, this means it is not possible.

You would need to write some native (ie C/C++) code that does what you wish (and then either call a binary from Java, or use JNI to plug your native code into Java.

--------------------------------------------------
Free Database Connection Pooling Software
 
Or if you know the way to do it by command line, you can execute the external command, get the output and parse it.

But remember you lose the cross-platform issue.

Cheers,

Dian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top