This is an automated email from the ASF dual-hosted git repository. markt pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-daemon.git
The following commit(s) were added to refs/heads/master by this push: new 8af7a98 Fix https://issues.apache.org/jira/browse/DAEMON-397 8af7a98 is described below commit 8af7a98b44267cc664839324a870839d17cecb1c Author: Mark Thomas <ma...@apache.org> AuthorDate: Fri Jun 14 17:19:44 2019 +0100 Fix https://issues.apache.org/jira/browse/DAEMON-397 Improve search for libjli.dylib on MacOS when using custom built OpenJDK binaries. --- src/changes/changes.xml | 4 ++++ src/native/unix/native/java.c | 8 ++++++++ 2 files changed, 12 insertions(+) diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 79e6798..0b3bfcf 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -134,6 +134,10 @@ <action issue="DAEMON-297" type="add" dev="markt"> jsvc. Include the full path to the jsvc executable in the debug log. </action> + <action issue="DAEMON-397" type="add" dev="markt" due-to="Petr Hadraba"> + jsvc. Improve search for libjli.dylib on MacOS when using custom built + OpenJDK binaries. + </action> </release> <release version="1.1.0" date="2017-11-15" description="Feature and bug fix release"> <action issue="DAEMON-368" type="add" dev="ggregory"> diff --git a/src/native/unix/native/java.c b/src/native/unix/native/java.c index 92033f7..90053e0 100644 --- a/src/native/unix/native/java.c +++ b/src/native/unix/native/java.c @@ -194,6 +194,14 @@ bool java_init(arg_data *args, home_data *data) return false; } } + // DAEMON-331 Alternative path for custom OpenJDK builds + if (stat(appf, &sb)) { + if (replace(appf, 1024, "$JAVA_HOME/lib/jli/libjli.dylib", + "$JAVA_HOME", data->path) != 0) { + log_error("Cannot replace values in loader library"); + return false; + } + } apph = dso_link(appf); if (apph == NULL) { log_error("Cannot load required shell library %s", appf);