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

    • Icon: Bug Bug
    • Resolution: Won't Fix
    • Icon: P4 P4
    • None
    • 1.3.0
    • core-svc
    • None
    • x86
    • windows_2000

      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.

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: