Skip to content

Commit e49f6c8

Browse files
LeviticusMBjoeferner
authored andcommitted
Only match JDK 6, 7 & 8 and not 16, 17 & 18.
1 parent ce4f251 commit e49f6c8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

find_java_libdir.sh

+2-2
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ main () {
2323
fi
2424

2525
local jre_dir
26-
if [[ "${java_version}" =~ (6|7|8) && "${os}" != "zos" ]]; then
26+
if [[ "${java_version}" =~ ^(6|7|8)$ && "${os}" != "zos" ]]; then
2727
jre_dir="${java_home}/jre/lib"
2828
else
2929
jre_dir="${java_home}/lib"
3030
fi
3131

3232
local lib_dir=""
33-
if [[ "${os}" == "linux" && ! "${java_version}" =~ (6|7|8) ]]; then
33+
if [[ "${os}" == "linux" && ! "${java_version}" =~ ^(6|7|8)$ ]]; then
3434
# no arch on JDK 9+
3535
lib_dir="${jre_dir}/server"
3636
elif [[ "${os}" == "linux" && "${target_arch}" == "arm" ]]; then

0 commit comments

Comments
 (0)