Do you mean adding `export JAVA_HOME=$(/usr/libexec/java_home)` in a separate script in `libexec`?