This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Java in General and the fly likes Is there an API to access sytem hardware information? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Is there an API to access sytem hardware information?" Watch "Is there an API to access sytem hardware information?" New topic
Author

Is there an API to access sytem hardware information?

Matt Kidd
Ranch Hand

Joined: Jul 17, 2002
Posts: 259
I'm currently working on a diagnostic page and it needs to report as much system information as possible.

Is there an API for this?

If I have to hand code this where would I start?

Addendum: okay I just found System.getProperties but that so far doesn't seem to tell me how to check drive space. I'll update in a couple hours what I've determined I can actually get information on.

Just found the Runtime class which will allow me to run commands at hte command line.

FYI, I'm coding this within the WebObjects Framework.
[ February 22, 2007: Message edited by: Matt Kidd ]
[ February 22, 2007: Message edited by: Matt Kidd ]
Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

Which Java version are you using?

In Java 6, some methods were added in class java.io.File such as getFreeSpace() and getUsableSpace() which you can use to find out how much space is available on a partition.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
Matt Kidd
Ranch Hand

Joined: Jul 17, 2002
Posts: 259
Originally posted by Jesper Young:
Which Java version are you using?

In Java 6, some methods were added in class java.io.File such as getFreeSpace() and getUsableSpace() which you can use to find out how much space is available on a partition.


1.5.
 
Consider Paul's rocket mass heater.
 
subject: Is there an API to access sytem hardware information?
 
Similar Threads
[B]BETA RESULTS "Java Associate"[/B]
Programming Katas
nevermind
Bert&Kathy - Some Ideas for you (was something more demanding)
How can I develop at home like I do at work?