Since #28928 we create the keystore in a post-install script. Through our scripts, this requires that JAVA_HOME be set or that java is in the path. If this is not the case, the post-install script fails and the installation is broken. It is too late to be failing in post-install. Instead, we should add a check in pre-install for this and fail early.