aspose file tools*
The moose likes Java in General and the fly likes System 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 "System information" Watch "System information" New topic
Author

System information

Atrus Greyor
Ranch Hand

Joined: Mar 07, 2004
Posts: 110
Is there any way to get java to display the system information of the computer you are currently on?

For example I want to know how big the RAM and Hard Drive are.

But I have no clue how to do it.
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

There's no built-in way to do it. Your choices are to use native methods (JNI), or execute an OS-dependent external program to return the values.


[Jess in Action][AskingGoodQuestions]
Atrus Greyor
Ranch Hand

Joined: Mar 07, 2004
Posts: 110
OK do you know if I can find a good online tutorial for JNI?
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24187
    
  34

Go right to the source: http://java.sun.com/docs/books/tutorial/native1.1/index.html .

Now, it seems to me that I recall a third-party open-source library, implemented for all your popular platforms, that did this sort of thing being already available. I can't recall what it's name was, however. Maybe someone else can?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: System information