os.arch and os.name is incorrect

Cedric Berger cedric@wireless-networks.com
Sun Feb 16 09:36:00 GMT 2003

Ranjit Mathew wrote:

>>- JDK 1.4.1: "Native binaries for  "Windows 2000" "x86" native libraries .."
>>- GCJ: "Native binaries for  "Windows 2000" "i586" native libraries .."
>Why is this wrong? It's just slightly different from the JDK output - the
>JDK 1.4.1 docs merely say "os.arch" is "Operating system architecture".
This is not a bug, but IMHO an unfortunate choice.
Think at the potential user of the os.arch property.
Beside printing pretty messages, it will probably be
used to identify a specific architecture, like Intel's one.
How would you code a function like:

   boolean isIntelArch() {

If everybody puts slightly different values in there?

More information about the Java mailing list