suffix=j2re1.7-oracle j2se_base="/usr/lib/jre/$suffix" if [ ! -e "$j2se_base/debian/info" ]; then exit 0 fi # alternative function program_alternative() { local program="$1" update-alternatives \ --remove "$program" "$j2se_base/bin/$program" } program_alternative ControlPanel program_alternative java program_alternative javaws program_alternative keytool program_alternative orbd program_alternative pack200 program_alternative policytool program_alternative rmid program_alternative rmiregistry program_alternative servertool program_alternative tnameserv program_alternative unpack200 # derive the architecture-specific # directory for the plugin arch_dir="$(dpkg --print-architecture)" # assemble the plugin path plugin_dir="$j2se_base/lib/$arch_dir" # iceweasel update-alternatives \ --remove "iceweasel-javaplugin.so" "$plugin_dir/libnpjp2.so" # chromium update-alternatives \ --remove "chromium-javaplugin.so" "$plugin_dir/libnpjp2.so"