Using JNI to find the CPU

Reply

Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Using JNI to find the CPU

 
0
  #1
Mar 16th, 2005
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++
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Using JNI to find the CPU

 
0
  #2
Mar 17th, 2005
Do you even have any kind of hardware that gets the temperature?
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Using JNI to find the CPU

 
0
  #3
Mar 17th, 2005
no, but in the boot menu u can get all that info, so i thought you dont need extra hardware
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Using JNI to find the CPU

 
0
  #4
Mar 17th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Using JNI to find the CPU

 
0
  #5
Mar 17th, 2005
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
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Using JNI to find the CPU

 
0
  #6
Mar 17th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Using JNI to find the CPU

 
0
  #7
Mar 17th, 2005
i tried what u said, but the class doesn't exist
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 350
Reputation: Ghost is an unknown quantity at this point 
Solved Threads: 2
Ghost's Avatar
Ghost Ghost is offline Offline
Posting Whiz

Re: Using JNI to find the CPU

 
0
  #8
Mar 17th, 2005
the code u gave me is for .NET
Reply With Quote Quick reply to this message  
Join Date: Jun 2004
Posts: 2,108
Reputation: server_crash is on a distinguished road 
Solved Threads: 18
server_crash server_crash is offline Offline
Postaholic

Re: Using JNI to find the CPU

 
0
  #9
Mar 17th, 2005
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.
Reply With Quote Quick reply to this message  
Join Date: Aug 2004
Posts: 780
Reputation: OurNation is an unknown quantity at this point 
Solved Threads: 9
OurNation's Avatar
OurNation OurNation is offline Offline
Master Poster

Re: Using JNI to find the CPU

 
0
  #10
Mar 17th, 2005
Is this just as like a novelity program beacuse you can download tools to do that.
PETA People for the Eating of Tasty Animals.


FireFox
Hijack This
Ad-Aware
Hijack this tutorial
Microsoft AntiSpyware
CompUchat
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Java Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC