Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-11-2007, 12:23 PM
Member
 
Join Date: Aug 2007
Posts: 2
lealea is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 08-13-2007, 07:23 PM
Member
 
Join Date: Aug 2007
Posts: 30
dmacvittie is on a distinguished road
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 -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 08-13-2007, 09:23 PM
Member
 
Join Date: Aug 2007
Posts: 2
lealea is on a distinguished road
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
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 08-13-2007, 09:35 PM
Member
 
Join Date: Aug 2007
Posts: 30
dmacvittie is on a distinguished road
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 -
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem loading resources. jimm1 Advanced Java 6 06-23-2008 08:31 PM
Accessing Resources in a JAR File JavaForums Java Blogs 0 04-15-2008 06:40 PM
How to execute an External Program through Java program Java Tip java.io 0 04-04-2008 03:40 PM
CRC check program 1 error javakid9000 New To Java 1 03-19-2008 06:04 AM
How to execute an External Program through Java program JavaBean Java Tips 0 10-04-2007 10:33 PM


All times are GMT +3. The time now is 05:28 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org