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

os.name returns "Windows NT (unknown)" on Windows Vista

XMLWordPrintable

    • x86
    • windows_vista

      PROBLEM:
      os.name returns "Windows NT (unknown)" on Windows Vista

      IMPACT:
      Deployment/Deployment, Deployment/Plugin tests etc which rely on os.name cannot run as results directory will be created as the following format:

      $USER_NAME.Windows_NT_(unknown).x86

      REPRODUCIBLE TESTCASE:
      I used the following testcase:

      import java.lang.*;

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

      OUTPUT:
      Compiled the file on windows-vista as follows:
      c:/j2sdk1.4.2_12/bin/javac Test.java

      Ran it with following output:
      c:/j2sdk1.4.2_12/bin/java Test
      os.name = Windows NT (unknown)
      os.arch = x86
      os.version = 6.0

      If I compile the file and run on windows-vista with mustang:
      c:/jdk1.6.0/bin/javac Test
      c:/jdk1.6.0/bin/java Test
      os.name = Windows Vista
      os.arch = x86
      os.version = 6.0

      NOTES:
      Windows Vista (TM) Beta 2 - Build 5308.

            Unassigned Unassigned
            rmcphers Raymond Mcpherson (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: