The moose likes Other JSE/JEE APIs and the fly likes How to detect running on 64 bit Windows Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "How to detect running on 64 bit Windows" Watch "How to detect running on 64 bit Windows" New topic
Author

How to detect running on 64 bit Windows

Eric Daly
Ranch Hand

Joined: Jul 11, 2006
Posts: 138
I've been working on this for probably a month now... Basically I can get the Windows version and Service pack level, but the bit isn't accurately determined. The bit is always returned as the bit of the JRE that the code is running on (usually the 32 bit JRE is running, even on 64 bit sytems). Can anyone tell me a way to find the bit of the actual OS that is running, not just the JRE? Or even point me in the right direction? I tried doing this in C and C++, but it's just so complicated that it's not really worth my time to figure it out... Maybe I can just check if there's a folder called "Program Files (x86)" or some roundabout trick like that... it just seems like Microsoft should have made a way to check this without extensive coding in C or C++. Thanks for any help.

This message was edited 1 time. Last update was at by Eric Daly



Studying for SCJP 6
 
 
subject: How to detect running on 64 bit Windows
 
MyEclipse, The Clear Choice