I\'m about to upgrade a tomcat installation from version 6.0 to version 8.5, and also upgrading the JVM from 6 to 8. Our java code is compiled with java 6 as for now.
I
As you already know, there is no real requirement for compiling Java code with the latest versions of the language. It is up to you.
Common points to consider:
I would (and I encourage you) to check the release notes to see what changes, improvements, compatibility constraints etc. are introduced in the new JVM version.