I have created a maven web project in eclipse. I want to compile it in jdk 1.6 and have its run time environment as 1.8.I have tomcat as the web container to run the project. For compiling I am aware of the Compliance level option in the project settings. Is it the correct way to go about the compile time requirement? And what settings do I have to change to make it run on java 1.8?
You run it on Java 8 by running it on Java 8. I don't want to be glib, but there's not much else to it. If Eclipse uses the regular Tomcat startup scripts, Tomcat will use the JVM that you have configured in the JAVA_HOME environment setting.