codetoad.com
  ASP Shopping CartForum & BBS
  - all for $20 from CodeToad Plus!
  
  Home || ASP | ASP.Net | C++/C# | DHTML | HTML | Java | Javascript | Perl | VB | XML || CodeToad Plus! || Forums || RAM 
Search Site:
Search Forums:
  Getting System Information...  V.S. at 06:28 on Monday, April 04, 2005
 

Yo Yo... Anyone have an idea on how to get the CPU informatin in Java? I'm working on a benchmark program and I need to figure out how to get system information about the computer. I know how to get the computer name: I accomplished that by using:

InetAddress.getLocalHost().getHostName()

It returns a string to be used in a label or whatever.

So does anyone know of a way to get the CPU information about a computer? peace...

.:[VS]:.



  Re: Getting System Information...  tietsjer at 22:08 on Monday, April 11, 2005
 

Hello, V.S.

I used information on this location to retrieve CPU info using javascript. Hope that is what you meaned.

http://msdn.microsoft.com/workshop/author/dhtml/reference/properties/cpuclass.asp

You can find the page (where I used it) overhere: http://users.telenet.be/tietsjer/pcthuishulp

Just click on "Probleemformulier" and scroll down. Next to "CPU (x86 = Intel)" you can find a code. According to the code you see, you can find out the know what kind of CPU it is.

I'm also looking for info about getting the CPU speed. But without any luck (for now).

Bye

Wim

  Re: Getting System Information...  kanad at 05:55 on Wednesday, April 13, 2005
 

It is not possible without the use of native code
and I think it is not part of the Java API.
what you can do is
use information provided by particular OS.
Use Runtime.exec() For executing particular code
on the OS
Any other library or code which you can use


Try this code
System.getProperty("os.arch")




© Copyright codetoad.com 2001-2005