aspose file tools*
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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

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
I agree. Here's the link:
subject: How to detect running on 64 bit Windows
Similar Threads
comparing System.getProperty to string
regular expression question
Accurately detecting 64 bit Windows architecture
32 Bit to 64 Bit
Detect which kind of JRE is installed - 32 or 64 bit