944,123 Members | Top Members by Rank

Ad:
  • Java Discussion Thread
  • Unsolved
  • Views: 6286
  • Java RSS
You are currently viewing page 1 of this multi-page discussion thread
Mar 16th, 2005
0

Using JNI to find the CPU

Expand Post »
Hi;

Does anyone know how 2 use jni??? I want to figure out the CPU temperature. Can somebody teach me how?

Thanx in advanced,
C++
Similar Threads
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

Do you even have any kind of hardware that gets the temperature?
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

no, but in the boot menu u can get all that info, so i thought you dont need extra hardware
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

Where is this boot menu at? I don't think what your seeing is the temperature, it might be the % usage of some process, but not the temperature.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

hit F8 when your computer is starting up to get the boot menu - boot menu may not be the proper name. Srry 4 being unclear.

Anyway, is there a way to find the % of CPU usage
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

Yes, you can get the usage, availible RAM, and stuff like that, using this class:

System.Diagnostics.PerformanceCounter

I don't have any examples handy, or I would post some code.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

i tried what u said, but the class doesn't exist
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

the code u gave me is for .NET
Reputation Points: 12
Solved Threads: 2
Posting Whiz
Ghost is offline Offline
352 posts
since Aug 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

Quote originally posted by C++ ...
i tried what u said, but the class doesn't exist
I am really sorry, that's a class in C#(syntax looks the same!). My mistake. I do think there is a way of doing this using JNI.

Look at this thread, I think it might help:

http://forum.java.sun.com/thread.jsp...sageID=2915348

I believe you have to do a bunch of other things besides in java to get the CPU usage.
Reputation Points: 113
Solved Threads: 19
Postaholic
server_crash is offline Offline
2,108 posts
since Jun 2004
Mar 17th, 2005
0

Re: Using JNI to find the CPU

Is this just as like a novelity program beacuse you can download tools to do that.
Reputation Points: 16
Solved Threads: 9
Master Poster
OurNation is offline Offline
780 posts
since Aug 2004

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Java Forum Timeline: organizing array output
Next Thread in Java Forum Timeline: Calling Object Methods within a LinkedList





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC