From ebd37f4a516cf757659c8970fcc1785f366efa8d Mon Sep 17 00:00:00 2001 From: Sven Hoexter Date: Sun, 26 Nov 2017 13:11:24 +0100 Subject: [PATCH] adjust binary path within the JDK for java and friends In the past we had /jre/bin now we've just /bin. Adjust all some functions to use a newly introduced variable $j2se_binary_subdir which carries the old diretory "/jre/bin" as default if undefined. Defined for JDK 9 as just "/bin". --- lib/oracle-jdk.sh | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/lib/oracle-jdk.sh b/lib/oracle-jdk.sh index 20a16c7..2c25e25 100644 --- a/lib/oracle-jdk.sh +++ b/lib/oracle-jdk.sh @@ -12,6 +12,7 @@ oracle_j2sdk_detect() { j2se_version_name="${j2se_release} version ${j2se_release}${j2se_update}" j2se_version=${j2se_release}${j2se_update}${revision} j2se_expected_min_size=340 #Mb + j2se_binary_subdir="/bin" fi # Update or GA release (jdk-7u15-linux-i586.tar.gz) @@ -118,6 +119,7 @@ EOF oracle_jre_lib_hl="jexec" oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jcmd jconsole jdb jdeps jhat jinfo jmap jmc jps jrunscript jsadebugd jstack jstat jstatd jvisualvm native2ascii rmic schemagen serialver wsgen wsimport xjc" j2se_package="$j2se_vendor-java$j2se_release-jdk" + j2se_binary_subdir="${j2se_binary_subdir:-/jre/bin}" j2se_run fi fi @@ -129,10 +131,10 @@ if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi -install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl -install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre +install_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_hl +install_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_jre if [ -n "$oracle_no_man_jre_bin_jre" ]; then - install_no_man_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre + install_no_man_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_no_man_jre_bin_jre fi install_no_man_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl install_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk @@ -153,10 +155,10 @@ if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then exit 0 fi -remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl -remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre +remove_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_hl +remove_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_jre_bin_jre if [ -n "$oracle_no_man_jre_bin_jre" ]; then - remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre + remove_alternatives $jvm_base$j2se_name${j2se_binary_subdir} $oracle_no_man_jre_bin_jre fi remove_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl remove_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk @@ -177,10 +179,10 @@ name=$j2se_name priority=${priority_override:-$j2se_priority} section=main EOF - jinfos "hl" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_hl - jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_jre + jinfos "hl" $jvm_base$j2se_name${j2se_binary_subdir}/ $oracle_jre_bin_hl + jinfos "jre" $jvm_base$j2se_name${j2se_binary_subdir}/ $oracle_jre_bin_jre if [ -n "$oracle_no_man_jre_bin_jre" ]; then - jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_no_man_jre_bin_jre + jinfos "jre" $jvm_base$j2se_name${j2se_binary_subdir}/ $oracle_no_man_jre_bin_jre fi jinfos "hl" $jvm_base$j2se_name/jre/lib/ $oracle_jre_lib_hl jinfos "jdk" $jvm_base$j2se_name/bin/ $oracle_bin_jdk -- 2.39.5