I have created a Restful Webservice(compiled and run on Java 8) with Tomcat Server on Windows machine. I have deployed it on Ubuntu System and it is working fine now until I set Java_Home path of Ubuntu system as JDK 8. After going through below link servlet init exception running jersey servlet on tomcat 7
But when my the path was JDK 7 or version below JDK 8 the war used to throw below exception :
type Exception report
message Servlet.init() for servlet Jersey Web Application threw exception
description The server encountered an internal error that prevented it from fulfilling this request.
exception javax.servlet.ServletException: Servlet.init() for servlet Jersey Web Application threw exception
root cause java.lang.UnsupportedClassVersionError: com/cms/RegisterVehicle/Registration/VehicleResource : Unsupported major.minor version 52.0
I want to know why War complied on JDK 8 is not compatible with the Server of JDK 7 ?