RFR: 8352935: Launcher should not add $JDK/../lib to LD_LIBRARY_PATH
    David Holmes 
    dholmes at openjdk.org
       
    Thu Apr  3 07:52:54 UTC 2025
    
    
  
On Tue, 1 Apr 2025 09:13:45 GMT, Joachim Kern <jkern at openjdk.org> wrote:
> In the JDK launcher, there is a codepath which would set/modify the LD_LIBRARY_PATH. This happens unconditionally on AIX and Linux/musl and can also happen on other Linux platforms if an LD_LIBRARY_PATH is pre-set which contains a libjvm.so.
> 
> The LD_LIBRARY_PATH is set to $JVMPATH:$JDK/lib:$JDK/../lib. The last part of this, $JDK/../lib, seems to be a remnant of times when there was a jre subfolder in a JDK deployment. So it should likely be removed.
Yes this was related to JRE but was changed to JDK by JDK-8343040. It does appear to be trying to find the upper lib directory in:
JAVA_HOME/bin
given the JRE location. Hence it is meaningless (and potentially "dangerous"!) when given the JDK/JAVA_HOME location
-------------
PR Comment: https://git.openjdk.org/jdk/pull/24351#issuecomment-2774778621
    
    
More information about the build-dev
mailing list