Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (780)
Games in Android Showcase (233)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  getting cpu speed and physical ram  (Read 3347 times)
0 Members and 1 Guest are viewing this topic.
Offline emzic

Senior Devvie

« Posted 2007-10-10 12:26:11 »

is there a way to get the exact cpu-speed and the amount of physical ram of a client-machine?

all i found was
which is just the number of cpus/cores.

which is just the max-heap.

if it is not possible with java alone, are there native libraries that provide this information?

Offline oNyx

JGO Coder

Medals: 2

pixels! :x

« Reply #1 - Posted 2007-10-10 12:54:42 »

If you aren't writing some kind of system monitor software, that kind of information isn't really interesting.

Max heap is all you got and cpu speed... well, there is speed step, different architectures with very different performance at the same clock speed, and there are also asynchronous architectures (w/o any clock speed whatsoever).

弾幕 ☆ @mahonnaiseblog
Offline emzic

Senior Devvie

« Reply #2 - Posted 2007-10-10 13:13:10 »

well, the reason i would need the exact information, is to make a survey about the computers our clients have.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline broumbroum

Junior Devvie

« Reply #3 - Posted 2007-10-10 16:27:19 »

There's the System.getProperties().list(System.out) that will retrieve ALL properties available to Java. Cheesy

::::... :..... :::::: ;;;:::™ b23:production 2006 GNU/GPL @
on /projects/sf3jswing
Java (1.6u10 plz) Web Start pool
dev' VODcast[/ur
Offline Mr_Light

Senior Devvie

Medals: 1


« Reply #4 - Posted 2007-10-10 16:43:03 »

public class PrintEnv {
  public static void main(String[] args) {
    for(String key : System.getenv().keySet()) {
      System.out.println(key + " - " + System.getenv().get(key));

is slightly more interesting.


but that might only be on windows, anyways I agree with oNyx. even if you know the Ghz they might have slow memory in there. I'd opt with 'auto calibration of video quality settings' and steal the data off that.

ps. mind you it's bad stealing info and not telling so  Kiss

It's harder to read code than to write it. - it's even harder to write readable code.

The gospel of brother Riven: "The guarantee that all bugs are in *your* code is worth gold." Amen brother a-m-e-n.
Offline emzic

Senior Devvie

« Reply #5 - Posted 2007-10-10 17:34:30 »

thanks a lot guys!

ps. mind you it's bad stealing info and not telling so  Kiss

who said, i'm not telling them?
Offline princec

« JGO Spiffy Duke »

Medals: 1061
Projects: 3
Exp: 20 years

Eh? Who? What? ... Me?

« Reply #6 - Posted 2007-10-10 18:48:58 »

ps. mind you it's bad stealing info and not telling so  Kiss
How many people know what IE sends to my server with every click on my site?

Cas Smiley

Offline keldon85

Senior Devvie

Medals: 1

« Reply #7 - Posted 2007-10-10 21:14:20 »

ps. mind you it's bad stealing info and not telling so  Kiss

That's only when it's sensitive data, your processor speed is hardly sensitive!!!

Offline erikd

JGO Ninja

Medals: 16
Projects: 4
Exp: 14 years


« Reply #8 - Posted 2007-10-11 08:19:57 »

Those system properties are not standard properties, so I wouldn't rely on them. They might not work on anything except Windows + Some Specific Sun JRE.

Pages: [1]
  ignore  |  Print  

hadezbladez (695 views)
2018-11-16 13:46:03

hadezbladez (342 views)
2018-11-16 13:41:33

hadezbladez (677 views)
2018-11-16 13:35:35

hadezbladez (167 views)
2018-11-16 13:32:03

EgonOlsen (2360 views)
2018-06-10 19:43:48

EgonOlsen (2472 views)
2018-06-10 19:43:44

EgonOlsen (1462 views)
2018-06-10 19:43:20

DesertCoockie (2127 views)
2018-05-13 18:23:11

nelsongames (1902 views)
2018-04-24 18:15:36

nelsongames (2569 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!