• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Paul Clapham
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Liutauras Vilda
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Roland Mueller
  • Piet Souris
Bartenders:

System.getProperty("os.arch") bug

 
Ranch Hand
Posts: 143
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,

I found this bug filed back in 2006. Why is it that when you call System.getProperty("os.arch") on a 64 bit version of Windows using a 32 bit version of JRE, it returns x86? Can anyone explain to me why this is not considered a bug? I only ask because "os.name" returns the operating system's name, "os.patch.level" returns the operating system's service pack level, so why does "os.arch" return the JRE's architecture? It's inconsistent, and very misleading. They shut down this bug report stating that it's "Not a Defect." Then what is it?

EDIT:
While looking through the documentation for OperatingSystemMXBean, I found the getArch() method, which "Returns the operating system architecture. This method is equivalent to System.getProperty("os.arch")." They are blatantly stating that this will return the operating system's architecture, while clearly it only returns the architecture of the currently running JVM. Sorry to go on such a rant here, but I think this is ridiculous!
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic