I have simple jar which includes the class MainClass
with static start and stop methods. When I use JDK6 and Prunsrv my service starts and stops successfully. When I switch to JDK I get this error when I start the service:
java.lang.UnsupportedClassVersionError: org/serv/MainClass : Unsupported major.minor version 52.0
How can I resolve this problem?
I've encountered this before.
It's usually due to the Java classes being compiled for one Java version (i.e. JSE 8) but they are ran with another (i.e. JSE 6).
Check your paths and make sure the appropriate version of the JVM is running the code.
See also: