JDK-6670965 : (launcher) Runtime.exec inherits LD_LIBRARY_PATH modifications from java process
  • Type: Bug
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: 6u1
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: solaris
  • CPU: x86
  • Submitted: 2008-03-04
  • Updated: 2010-08-04
  • Resolved: 2009-12-01
Related Reports
Duplicate :  
Relates :  
Description
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).

Comments
EVALUATION This issues is resolved via 6367077, closing this as a duplicate.
01-12-2009

EVALUATION Needs to be looked at when investigating other LD_LIBRARY_PATH/launcher issues.
16-03-2008