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

(launcher) Runtime.exec inherits LD_LIBRARY_PATH modifications from java process

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 6u1
    • tools
    • x86
    • solaris

      At least verified with JDK 1.6.0_01 on Solaris 10 x86:
      - It appears that the java executable re-execs itself with a modified LD_LIBRARY_PATH.
      - If a Java application (run via the java executable) calls java.lang.Runtime.exec(String[]), the spawned process inherits the modified LD_LIBRARY_PATH, not the original one from the environment in which the java executable was started.

      In my opinion this is a bug, as the modification of LD_LIBRARY_PATH in the java executable should be a secret implementation detail; leaking it should be avoided. This causes problems for example if the spawned process in turn wants to load a JVM, esp. a different version than the originally started java executable (which can happen for example in StarOffice/OpenOffice.org usage scenarios).

            ksrini Kumar Srinivasan
            duke J. Duke
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: