There are indeed some additional problems with JDK9: - the packages set up alternatives to binaries under jre/bin and jre/lib; JDK9 no longer has a jre subdir => as far as I can tell the binaries in question have also been present directly under bin and lib (at least since JDK6), so there does not immediately seem to be a reason for not taking them from there instead - JDK9 no longer includes man pages
It may make more sense to give it its own .sh instead, rather than trying to special-case it in multiple places.