File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
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: 256
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: 13875
    
  10

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: 256
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Is there an API to access sytem hardware information?
 
Similar Threads
nevermind
[B]BETA RESULTS "Java Associate"[/B]
How can I develop at home like I do at work?
Programming Katas
Bert&Kathy - Some Ideas for you (was something more demanding)