2 j2se_detect_oracle_j2sdk=oracle_j2sdk_detect
3 oracle_j2sdk_detect() {
6 case "${DEB_BUILD_ARCH:-$DEB_BUILD_GNU_TYPE}" in
8 case "$archive_name" in
9 "jdk-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=130 #Mb
15 "jdk-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=190 #Mb
23 amd64|x86_64-linux-gnu)
24 case "$archive_name" in
25 "jdk-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=130 #Mb
31 "jdk-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=180 #Mb
40 if [[ -n "$found" ]]; then
44 Java(TM) Development Kit (JDK)
45 Standard Edition, Version $j2se_version
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) JDK, Standard Edition, Oracle(TM)"
55 j2se_install=oracle_j2sdk_install
56 j2se_remove=oracle_j2sdk_remove
57 j2se_jinfo=oracle_j2sdk_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"
62 oracle_bin_jdk="appletviewer extcheck idlj jar jarsigner javac javadoc javah javap jconsole jdb jinfo jmap jps jsadebugd jstack jstat jstatd native2ascii rmic serialver"
68 oracle_j2sdk_install() {
70 if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
74 install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl
75 install_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre
76 install_no_man_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre
77 install_no_man_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
78 install_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
80 plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH"
81 install_browser_plugin "/usr/lib/iceweasel/plugins" "libjavaplugin.so" "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so"
82 install_browser_plugin "/usr/lib/chromium/plugins" "libjavaplugin.so" "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so"
86 oracle_j2sdk_remove() {
88 if [ ! -e "$jvm_base$j2se_name/debian/info" ]; then
92 remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_hl
93 remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_jre_bin_jre
94 remove_alternatives $jvm_base$j2se_name/jre/bin $oracle_no_man_jre_bin_jre
95 remove_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
96 remove_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
98 plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH"
99 remove_browser_plugin "iceweasel-javaplugin.so" "\$plugin_dir/libnpjp2.so"
100 remove_browser_plugin "chromium-javaplugin.so" "\$plugin_dir/libnpjp2.so"
104 oracle_j2sdk_jinfo() {
107 priority=$j2se_priority
110 jinfos "hl" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_hl
111 jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_jre_bin_jre
112 jinfos "jre" $jvm_base$j2se_name/jre/bin/ $oracle_no_man_jre_bin_jre
113 jinfos "hl" $jvm_base$j2se_name/jre/lib/ $oracle_jre_lib_hl
114 jinfos "jdk" $jvm_base$j2se_name/bin/ $oracle_bin_jdk
115 echo "plugin iceweasel-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"
116 echo "plugin chromium-javaplugin.so $jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH/libnpjp2.so"