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

[macosx] Mac OS X platform version checks need revision.

XMLWordPrintable

    • x86
    • os_x

      FULL PRODUCT VERSION :
      java version "1.7.0_04-ea"
      Java(TM) SE Runtime Environment (build 1.7.0_04-ea-b12)
      Java HotSpot(TM) 64-Bit Server VM (build 23.0-b15, mixed mode)

      ADDITIONAL OS VERSION INFORMATION :
      Mac OS X 10.7.3
      Mac OS X Server 10.7.3
      and others

      A DESCRIPTION OF THE PROBLEM :
      The OS platform checks for Mac OS X in the JDK have a wide variety of patterns (.equals("Mac OS X"), .startsWith("Mac OS"), etc), however for the greatest robustness against known and likely possible changes the ideal form is .contains("OS X").

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      Modify the ProductName key in /System/Library/CoreServices/SystemVersion.plist (the file will have to be edited as root). Remove "Mac" from the beginning.

      Run SwingSet:
      java -jar /Library/Java/Demos/JFC/SwingSet2/SwingSet2.jar

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      SwingSet comes up in Aqua.
      ACTUAL -
      SwingSet comes up in Metal, lots of other stuff is broken.

      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Error occurred loading demo: HtmlDemo

      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      Stock demo provided by Apple's developer packages:
      /Library/Java/Demos/JFC/SwingSet2/SwingSet2.jar
      ---------- END SOURCE ----------

            jmelvin James Melvin (Inactive)
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: