Install Java and Postgres after repository setup to avoid install with outdated repository.