oracle_j2sdk_detect() {
j2se_release=0
+ # JDK 10 release candidate (jdk-10+46_linux-x64_bin.tar.gz)
+ if [[ $archive_name =~ jdk-10(\.([0-9]+)\.([0-9]+)|\+[0-9]+)?_linux-x64_bin\.tar\.gz ]]
+ then
+ j2se_release=10
+ j2se_update=${BASH_REMATCH[1]:-.0.0}
+ j2se_arch=x64
+ 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"
+ oracle_no_man_jre_bin_jre="appletviewer idlj jaotc jar jarsigner java javac javadoc javap javapackager javaws jcmd jconsole jcontrol jdb jdeprscan jdeps jhsdb jimage jinfo jjs jlink jmap jmod jps jrunscript jshell jstack jstat jstatd jweblauncher keytool orbd pack200 rmic rmid rmiregistry schemagen serialver servertool tnameserv unpack200 wsgen wsimport xjc"
+ oracle_bin_jdk=" "
+ oracle_jre_bin_hl=" "
+ oracle_jre_bin_jre=" "
+ fi
+
# JDK 9 GA release (jdk-9.0.1_linux-x64_bin.tar.gz)
if [[ $archive_name =~ jdk-9(\.([0-9]+)\.([0-9]+))?_linux-x64_bin\.tar\.gz ]]
then
install_no_man_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
install_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
-# No plugin for ARM architecture yet
-if [ "${DEB_BUILD_ARCH:0:3}" != "arm" ]; then
+# No plugin for ARM architecture yet and no plugin in Java 10 later
+if [[ "${DEB_BUILD_ARCH:0:3}" != "arm" && "${j2se_release}" -lt "10" ]]; then
plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH"
for b in $browser_plugin_dirs;do
install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
remove_alternatives $jvm_base$j2se_name/jre/lib $oracle_jre_lib_hl
remove_alternatives $jvm_base$j2se_name/bin $oracle_bin_jdk
-# No plugin for ARM architecture yet
-if [ "${DEB_BUILD_ARCH:0:3}" != "arm" ]; then
+# No plugin for ARM architecture yet and no plugin in Java 10 and later
+if [[ "${DEB_BUILD_ARCH:0:3}" != "arm" && "${j2se_release}" -lt "10" ]]; then
plugin_dir="$jvm_base$j2se_name/jre/lib/$DEB_BUILD_ARCH"
for b in $browser_plugin_dirs;do
remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
oracle_j2re_detect() {
j2se_release=0
+ # JRE 10 release candidate (oracle-java10-jre_10+46_amd64.deb)
+ if [[ $archive_name =~ ^jre-10(\.([0-9]+)\.([0-9]+)|\+[0-9]+)?_linux-x64_bin\.tar\.gz ]]
+ then
+ j2se_release=10
+ j2se_update=${BASH_REMATCH[1]:-.0.0}
+ j2se_arch=x64
+ j2se_version_name="${j2se_release} version ${j2se_release}${j2se_update}"
+ j2se_version=${j2se_release}${j2se_update}${revision}
+ oracle_no_man_jre_bin_jre="appletviewer idlj java javaws jcontrol jjs jrunscript jweblauncher keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200"
+ oracle_jre_bin_hl=" "
+ oracle_jre_bin_jre=" "
+ oracle_jre_lib_hl=" "
+ fi
+
# JRE 9 GA release (jre-9.0.1_linux-x64_bin.tar.gz)
if [[ $archive_name =~ ^jre-9(\.([0-9]+)\.([0-9]+))?_linux-x64_bin\.tar\.gz ]]
then
j2se_remove=oracle_j2re_remove
j2se_jinfo=oracle_j2re_jinfo
j2se_control=oracle_j2re_control
- oracle_jre_bin_hl="java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool"
- oracle_jre_bin_jre="javaws policytool"
- oracle_no_man_jre_bin_jre="ControlPanel jcontrol"
- oracle_jre_lib_hl="jexec"
+ oracle_jre_bin_hl="${oracle_jre_bin_hl:-java javaws keytool orbd pack200 rmid rmiregistry servertool tnameserv unpack200 policytool}"
+ oracle_jre_bin_jre="${oracle_jre_bin_jre:-javaws policytool}"
+ oracle_no_man_jre_bin_jre="${oracle_no_man_jre_bin_jre:-ControlPanel jcontrol}"
+ oracle_jre_lib_hl="${oracle_jre_lib_hl:-jexec}"
j2se_package="$j2se_vendor-java$j2se_release-jre"
j2se_run
fi
install_no_man_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre
install_no_man_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl
-plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
-for b in $browser_plugin_dirs;do
- install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-done
+if [[ "${j2se_release}" -lt "10" ]]; then
+ plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
+ for b in $browser_plugin_dirs;do
+ install_browser_plugin "/usr/lib/\$b/plugins" "libjavaplugin.so" "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
+ done
+fi
EOF
}
remove_alternatives $jvm_base$j2se_name/bin $oracle_no_man_jre_bin_jre
remove_alternatives $jvm_base$j2se_name/lib $oracle_jre_lib_hl
-plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
-for b in $browser_plugin_dirs;do
- remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
-done
+if [[ "${j2se_release}" -lt "10" ]]; then
+ plugin_dir="$jvm_base$j2se_name/lib/$DEB_BUILD_ARCH"
+ for b in $browser_plugin_dirs;do
+ remove_browser_plugin "\$b-javaplugin.so" "\$plugin_dir/libnpjp2.so"
+ done
+fi
EOF
}