Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (749)
Games in Android Showcase (226)
games submitted by our members
Games in WIP (837)
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 3143 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: 1009
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  

Solater (7 views)
2018-03-17 05:04:08

nelsongames (28 views)
2018-03-05 17:56:34

Gornova (28 views)
2018-03-02 22:15:33

buddyBro (75 views)
2018-02-28 16:59:18

buddyBro (51 views)
2018-02-28 16:45:17

xxMrPHDxx (455 views)
2017-12-31 17:17:51

xxMrPHDxx (136 views)
2017-12-31 17:15:51

xxMrPHDxx (213 views)
2017-12-28 18:11:33

Ecumene (473 views)
2017-09-30 02:57:34

theagentd (590 views)
2017-09-26 18:23:31
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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!