Results 1 to 4 of 4
  1. #1
    lealea is offline Member
    Join Date
    Aug 2007
    Posts
    2
    Rep Power
    0

    Question how to check available resources in java program

    Hi,

    How can I check these resources from a Java program in Windows2000:
    • CPU
    • available memory
    • bandwidth


    thank you

  2. #2
    dmacvittie is offline Member
    Join Date
    Aug 2007
    Posts
    30
    Rep Power
    0

    Default

    Hey lealea,

    Java really wasn't meant to do this, but there are ways to do anything. I would use System.LoadLibrary to get the Windows Management Interface (WMI) code into your Java app, then call the WMI routines you need to get these stats. This solution is very windows centric, but it's relatively quick.

    Don.
    Don MacVittie F5 Networks - DevCentral

  3. #3
    lealea is offline Member
    Join Date
    Aug 2007
    Posts
    2
    Rep Power
    0

    Default

    Hi Don,

    thank you for giving me a direction.
    Can you refer me to a simple example of loading WIN & working with its routines?


    thanks alot

  4. #4
    dmacvittie is offline Member
    Join Date
    Aug 2007
    Posts
    30
    Rep Power
    0

    Default

    Note that it's been a while since I had to do this, and there could very well be a better way, but the jawin project lets you call nearly any COM interface from Java.

    There are some decent samples there of calling misc. routines built into Windows.
    Don.
    Don MacVittie F5 Networks - DevCentral

Similar Threads

  1. Problem loading resources.
    By jimm1 in forum Advanced Java
    Replies: 6
    Last Post: 06-23-2008, 08:31 PM
  2. Replies: 0
    Last Post: 04-04-2008, 03:40 PM
  3. CRC check program 1 error
    By javakid9000 in forum New To Java
    Replies: 1
    Last Post: 03-19-2008, 06:04 AM
  4. Replies: 0
    Last Post: 10-04-2007, 10:33 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •