Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Luna API shared library to library path for Java 9+ #926

Merged
merged 2 commits into from
Jan 4, 2022

Conversation

dmikusa
Copy link
Contributor

@dmikusa dmikusa commented Jan 3, 2022

With Java 9, the extension directory functionality was dropped. This means the buildpack has to handle installation different for Java 8 and Java 9+. With Java 8, we add the required files to the extension directory. With Java 9, we add the required JAR file to the classpath, but this was not sufficient to load the required shared library. To fix this, we are adding the Luna API shared library to the LD_LIBRARY_PATH environment variable. The JVM uses this to locate shared libraries, so it can now find the shared library.

With Java 9, the extension directory functionality was dropped. This means the buildpack has to handle installation different for Java 8 and Java 9+. With Java 8, we add the required files to the extension directory. With Java 9, we add the required JAR file to the classpath, but this was not sufficient to load the required shared library. To fix this, we are adding the Luna API shared library to the LD_LIBRARY_PATH environment variable. The JVM uses this to locate shared libraries, so it can now find the shared library.

Signed-off-by: Daniel Mikusa <dmikusa@vmware.com>
Co-authored-by: David O'Sullivan <31728678+pivotal-david-osullivan@users.noreply.github.com>
Copy link
Contributor

@pivotal-david-osullivan pivotal-david-osullivan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

@pivotal-david-osullivan pivotal-david-osullivan merged commit 7322eff into main Jan 4, 2022
@dmikusa dmikusa deleted the luna-path-issue branch January 4, 2022 15:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants