Installs jdk and updates alternatives.