JDK-8178692 : Clean up RequiresSetenv / LD_LIBRARY_PATH
  • Type: Enhancement
  • Component: tools
  • Sub-Component: launcher
  • Affected Version: repo-portola
  • Priority: P4
  • Status: New
  • Resolution: Unresolved
  • Submitted: 2017-04-12
  • Updated: 2019-01-16
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Related Reports
Relates :  
Relates :  
Relates :  
Some platforms require the launcher to explicitly ensure that LD_LIBRARY_PATH (or its equivalent) is correctly set up. This is done to make sure the right libjvm.so/libjava.so/... are found, loaded and used.

The whole logic could use some cleaning up and rethinking.
It has been removed, but AIX uses LD_LIBRARY_PATH, since it has no notion of rtld(1) $ORIGIN, and now musl for different reasons.

There be dragons! I thought most uses of LD_LIBRARY_PATH for libjvm.so were removed as of JDK 7 (https://blogs.oracle.com/darcy/entry/purging_ld_library_path). If a platform doesn't need to support multiple libjvm.so's selectable at launch time, the technical problems should be greatly simplified.

One potential way to solve this (needs to be thought through) is to unify libjava.so and libjvm.so, and have a single DSO. There may be other caveats with this approach though.