can't upgrade jenkins for java version error
You're using Java 7, but Jenkins needs Java 8 - see: https://jenkins.io/blog/2017/04/10/jenkins-has-upgraded-to-java-8
You need JDK 8 to run jenkins: https://www.digitalocean.com/community/tutorials/how-to-install-java-with-apt-get-on-ubuntu-16-04