2 j2se_detect_oracle_j2re=oracle_j2re_detect
6 case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
8 case "$archive_name" in
9 "jre-6u"[0-9][0-9]"-linux-i586.bin") # SUPPORTED
10 j2se_version=1.6.0+update${archive_name:6:2}${revision}
11 j2se_expected_min_size=16 #Mb
15 "jre-7u"[0-9]"-linux-i586.tar.gz") # SUPPORTED
16 j2se_version=1.7.0+update${archive_name:6:1}${revision}
17 j2se_expected_min_size=94 #Mb
23 amd64|x86_64-linux-gnu)
24 case "$archive_name" in
25 "jre-6u"[0-9][0-9]"-linux-x64.bin") # SUPPORTED
26 j2se_version=1.6.0+update${archive_name:6:2}${revision}
27 j2se_expected_min_size=16 #Mb
31 "jre-7u"[0-9]"-linux-x64.tar.gz") # SUPPORTED
32 j2se_version=1.7.0+update${archive_name:6:1}${revision}
33 j2se_expected_min_size=88 #Mb
40 if [[ -n "$found" ]]; then
44 Java(TM) Runtime Environment (JRE)
45 Standard Edition, Version $j2se_version
46 Oracle Microsystems(TM), Inc.
48 if read_yn "Is this correct [Y/n]: "; then
50 j2se_release="${j2se_version:0:3}"
51 j2se_required_space=$(( $j2se_expected_min_size * 2 + 20 ))
53 j2se_title="Java(TM) JRE, Standard Edition, Oracle Microsystems(TM)"
55 j2se_install=oracle_j2re_install
56 j2se_remove=oracle_j2re_remove
57 j2se_jinfo=oracle_j2re_jinfo
58 oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool"
59 oracle_jre_bin_jre="javaws policytool"
60 oracle_no_man_jre_bin_jre="ControlPanel"
61 oracle_jre_lib_hl="jexec"
67 oracle_j2re_install() {
69 if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
73 install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl
74 install_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre
75 install_no_man_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre
76 install_no_man_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl
78 plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
79 install_browser_plugin "/usr/lib/iceweasel/plugins" "libjavaplugin.so" "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so"
80 install_browser_plugin "/usr/lib/chromium/plugins" "libjavaplugin.so" "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so"
84 oracle_j2re_remove() {
86 if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
90 remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_hl
91 remove_alternatives $jvm_base$j2se_name/bin $oracle_jre_bin_jre
92 remove_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre
93 remove_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl
95 plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
96 remove_browser_plugin "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so"
97 remove_browser_plugin "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so"
101 oracle_j2re_jinfo() {
104 priority=$j2se_priority
107 jinfos "hl" $jvm_base$j2se_name/bin/ $oracle_jre_bin_hl
108 jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_jre_bin_jre
109 jinfos "jre" $jvm_base$j2se_name/bin/ $oracle_no_man_jre_bin_jre
110 jinfos "hl" $jvm_base$j2se_name/lib/ $oracle_jre_lib_hl
111 echo "plugin iceweasel-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so"
112 echo "plugin chromium-javaplugin.so $jvm_base$j2se_name/lib/$DEB_BUILD_ARCH/libnpjp2.so"