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.
Other
repo-portolaUnresolved
Related Reports
Relates :  
Relates :  
Relates :  
Description
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.
Comments
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.
12-04-2017

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.
12-04-2017

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.
12-04-2017