2 j2se_detect_oracle_j2re=oracle_j2re_detect
6 # Update or GA release (jre-7u13-linux-x64.tar.gz)
7 if [[ $archive_name =~ jre-([0-9]+)(u([0-9]+))?-linux-(i586|x64|amd64)\.(bin|tar\.gz) ]]
9 j2se_release=${BASH_REMATCH[1]}
10 j2se_update=${BASH_REMATCH[3]}
11 j2se_arch=${BASH_REMATCH[4]}
12 if [[ $j2se_update != "" ]]
14 j2se_version_name="$j2se_release Update $j2se_update"
15 j2se_version=${j2se_release}u${j2se_update}
17 j2se_version_name="$j2se_release GA"
18 j2se_version=${j2se_release}
22 # Early Access Release (jre-8-ea-bin-b103-linux-x64-15_aug_2013.tar.gz)
23 if [[ $archive_name =~ jre-([0-9]+)(u([0-9]+))?-(ea|fcs)-bin-(b[0-9]+)-linux-(i586|x64|amd64).*\.(bin|tar\.gz) ]]
25 j2se_release=${BASH_REMATCH[1]}
26 j2se_update=${BASH_REMATCH[3]}
27 j2se_build=${BASH_REMATCH[5]}
28 j2se_arch=${BASH_REMATCH[6]}
29 if [[ $j2se_update != "" ]]
31 j2se_version_name="$j2se_release Update $j2se_update Early Access Release Build $j2se_build"
32 j2se_version=${j2se_release}u${j2se_update}~ea-build-${j2se_build}
34 j2se_version_name="$j2se_release Early Access Release Build $j2se_build"
35 j2se_version=${j2se_release}~ea-build-${j2se_build}
39 if [[ $j2se_release > 0 ]]
41 j2se_priority=$((310 + $j2se_release - 1))
42 j2se_expected_min_size=85 #Mb
44 # check if the architecture matches
47 case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
49 if [[ "$j2se_arch" != "i586" ]]; then compatible=0; fi
51 amd64|x86_64-linux-gnu)
52 if [[ "$j2se_arch" != "x64" && "$j2se_arch" != "amd64" ]]; then compatible=0; fi
56 if [[ $compatible == 0 ]]
58 echo "The archive $archive_name is not supported on the ${DEB_BUILD_ARCH} architecture"
66 Java(TM) Runtime Environment (JRE)
67 Standard Edition, Version $j2se_version_name
70 if read_yn "Is this correct [Y/n]: "; then
72 j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 ))
74 j2se_title="Java(TM) JRE, Standard Edition, Oracle(TM)"
76 j2se_install=oracle_j2re_install
77 j2se_remove=oracle_j2re_remove
78 j2se_jinfo=oracle_j2re_jinfo
79 oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool"
80 oracle_jre_bin_jre="javaws policytool"
81 oracle_no_man_jre_bin_jre="ControlPanel"
82 oracle_jre_lib_hl="jexec"
88 oracle_j2re_install() {
90 if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
94 install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl
95 install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre
96 install_no_man_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre
97 install_no_man_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl
99 plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
100 for b in $browser_plugin_dirs;do
101 install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
106 oracle_j2re_remove() {
108 if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
112 remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl
113 remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre
114 remove_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre
115 remove_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl
117 plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
118 for b in $browser_plugin_dirs;do
119 remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
124 oracle_j2re_jinfo() {
127 priority=$j2se_priority
130 jinfos "hl" $jvm_base$j2se_name/bin/ $oracle_jre_bin_hl
131 jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_jre_bin_jre
132 jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_no_man_jre_bin_jre
133 jinfos "hl" $jvm_base$j2se_name/lib/ $oracle_jre_lib_hl
134 for b in $browser_plugin_dirs;do
135 echo "plugin $b-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so"