Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4468998

System property "os.arch" is not returning consistent values

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 1.4.0
    • 1.4.0
    • core-libs
    • beta2
    • generic
    • generic

      public class OSArch {
          public static void main(String[] args) {
              System.out.println("os.arch = " + System.getProperty("os.arch"));
          }
      }

      The system property "os.arch" should be consistent (and preferably consistent with the directory in lib). Here is the value printed out on various platforms (merlin b67):

      Solaris sparc : "sparc"
      Solaris sparc 64-bit mode : "sparc"
      Solaris intel : "x86"
      Linux : "i386"

      This property is needed for determining the location of the libraries (which is also used to determine the location of the java.awt.Robot executable). It would be nice if the property value were consistent with the directory in lib. There are a number of problems with the current property's values:

      + There is no way to distinguish "sparc" from "sparcv9", since the executables and libraries are in a different directory for 64-bit solaris.

      + The directory in lib is named "i386" on both Solaris intel and Linux, but the property value is inconsistent between the two. It would be nice if it were "i386" for both, since this is the directory name in lib.

            kbr Kenneth Russell (Inactive)
            mmartaksunw Michael Martak (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: