Hi all,
How do I get the name of the video card from Java? I looked at GraphicsEnvironment and GraphicsDevice but didn’t see anything. The GraphicsDevice.getIDstring() method looked promising, but that was not it.
Thanks,
Willie
Hi all,
How do I get the name of the video card from Java? I looked at GraphicsEnvironment and GraphicsDevice but didn’t see anything. The GraphicsDevice.getIDstring() method looked promising, but that was not it.
Thanks,
Willie
There’s no way to do that currently.
OK, thanks for the info. That was what I needed to know!
If Java cannot get the name of your video card, can it at least get the model of your CPU?
I’m wondering why would you need cpu info, but you can get some stuff from the system properties (via System.getProperty(…)).
On my system:
os.arch = x86
sun.cpu.endian = little
sun.cpu.isalist = pentium_pro+mmx pentium_pro pentium+mmx pentium i486 i386 i86
One way to find out the list of properties is to start java applet in the browser, and bring up java console. Press ‘s’ in the console, it’ll dump the system properties.
[quote]I’m wondering why would you need cpu info…
[/quote]
Well, if your application needs to know whether or not your hardware meets minimum or recommended system requirements, then it needs info on your CPU, GPU, APU, RAM, etc.
Yeah, this is a pretty standard feature of games these days (even though they should never prevent you from playing - I use to have windows games that WOULD NOT RUN on NT because they checked, saw it was NT, and refused to start - even though NT had been upgraded and had DirectX added since they were published :().
It’s a good idea to do some basic checking in startup - especially if you have a “select resolution / fullscreen?” dialog - because you can throw up a “Warning: your computer doesn’t mean recommended specs, you may find this runs very slowly”. Even better, with ill-behaved video cards, you can throw up “Warning: your video-card manufacturer makes really terrible drivers, this game may go hopelessly wrong, and it’s not our fault!” ;D.
Saves you considerable pain on support-queries (and complaints!).
Also handy if you generate debug files, e.g. if FPS drops below 10, you might output logging info to a file that the user can email you, so you can quickly decide if its a bug in your code, or just a Pentium-100 trying to run your FPS ;).
jc: I see your point.
One thing you can check is the amount of available video memory (see GraphicsDevice class).
Another thing you can find out is the number of processes (Runtime.availableProcessors()).
blahahah:
You typically put all that info into your release notes, which nobody ever reads =)