Please don't hijack someone else's post on a completely unrelated subject. I have moved your post to its own thread.
Your compiler and runtime versions of java are not the same - for instance you've compiled code on a later version of JDK and trying to run on an earlier version of the JRE. You can update your JRE, compile with an older JDK, or set compiler options for the code to run on earlier JRE's. The latter two are under the assumption the code does not use features of the later version of java.