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

JDK7 webstart's console output may need to explicitly load msvcr71.dll when running JRE 6

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • 7
    • 7
    • deploy

      In JDK 6 there was a fix to the console output for webstart
      as a consequence of the compiler upgrade
      6224633: Windows Java Web Start potential issue with VS.NET 2003 compiler
      upgrade

      deploy/common/windows/native/console.cpp explictly loads msvcrt.dll
      so that a webstart running an older JRE can correctly direct console output.

      In JDK 7 we'll be upgrading again : to VS2010, so it seems that
      a similar fix will be needed to support all 3 cases (VC6, VS2003, VS2010)

      Since JDK7 will only have msvcr100.dll, then if this older DLL is
      really needed, it will have to be found in the older JRE's bin directory.

      Some explanation is in the comments in
      deploy/src/common/share/classes/com/sun/deploy/util/ConsoleHelper.java

              * This calls into jvm.dll _JVM_DumpAllStacks function to get the
              * stack trace.
              *
              * The native code will redirect the file descriptor 1 (stdout) to a
              * temp file, call _JVM_DumpAllStacks, get the output from the temp
              * file and return it.
              *
              * Starting in 6.0 on Windows, Java is compiled with VC7. Older
              * releases is compiled with VC6. So when doing the stdout redirection,
              * we must load the correct C-Runtime (CRT) because Java Web Start can
              * run with different versions of Java; and different versions of CRT
              * has its own stdout state.
              *
              * When we are running in mustang or above, we will be using the
              * msvcr71.dll, which is the CRT that we bundled in mustang or above.
              *
              * However, when Java Web Start 6.0 tries to run with any JRE before
              * mustang, we must do the stdout redirection with the CRT from VC6,
              * msvcrt.dll, otherwise the output from _JVM_DumpAllStacks from Java
              * 5.0 or earlier will not be seen.

            ngthomas Thomas Ng (Inactive)
            prr Philip Race
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: