This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
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: 143
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.


Studying for SCJP 6
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
 
subject: How to detect running on 64 bit Windows
 
Similar Threads
Detect which kind of JRE is installed - 32 or 64 bit
32 Bit to 64 Bit
comparing System.getProperty to string
Accurately detecting 64 bit Windows architecture
regular expression question