Skip to content

Commit

Permalink
Use find to get JAVA_HOME
Browse files Browse the repository at this point in the history
  • Loading branch information
mueller-ma committed Nov 11, 2023
1 parent cde8762 commit 8264231
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion alpine/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -eux -o pipefail ${EXTRA_SHELL_OPTS-}
IFS=$'\n\t'

export JAVA_HOME=$(ls -d /usr/lib/jvm/*jdk*)
export JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -name "*jdk*" -type d)

# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
Expand Down
2 changes: 1 addition & 1 deletion debian/entrypoint
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ interactive=$(if test -t 0; then echo true; else echo false; fi)
set -eux -o pipefail ${EXTRA_SHELL_OPTS-}
IFS=$'\n\t'

export JAVA_HOME=$(ls -d /usr/lib/jvm/*jdk* | tail -n 1)
export JAVA_HOME=$(find /usr/lib/jvm/ -maxdepth 1 -name "*jdk*" -type d)

# Configure Java unlimited strength cryptography
if [ "${CRYPTO_POLICY}" = "unlimited" ]; then
Expand Down

0 comments on commit 8264231

Please sign in to comment.