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

On win32, Runtime.exec with socket trnsprt fails if env. var. SystemRoot not set

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 1.3.0
    • Fix Version/s: None
    • Component/s: core-svc
    • Labels:
      None
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_2000

      Description

      I have tried to execute (in Java) the process given by the following command line:
      java -Xdebug -Xnoagent -Xrunjdwp:transport=dt_socket,server=y,suspend=n -cp . Simple

      The process is correctly launched if Runtime.exec (String []) method is used.
      However, if I try to pass some environment variables and thus I use Runtime.exec (String [], String []) method, then the process fails with this report:

      FATAL ERROR in native method: No transport initialized
      err:: No such file or directory
      Error [2] in socket() call!
      Socket transport failed to init.
      Transport dt_socket failed to initialize, rc = -1

      It seems that there are problems to find needed libraries in the second case. I emphasize, that my environmetal settings were the same in both cases. The only difference is in used exec method.

      The problem can be reproduced using the attached files. ExecTest calls Runtime.exec with one paramether if no arguments are passed to it, otherwise it calls Runtime.exec with two parameters.

      Note: The problem can be reproduced on JDK1.4, build b62 as well.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              jjh James Holmlund (Inactive)
              Reporter:
              duke J. Duke (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: