Till you send the code, I would tell you what the problem is according to me.
Actually, java.lang.UnsupportedClassVersionError happens because of a higher JDK during compile time and lower JDK during runtime.
Don't worry, It is actually simple. What you need to do is, you need to first uninstall the JRE/JDK that you have (also the IDE) and then install BOTH JRE / JDK of the same version, like:
JRE 6 -> JDK 6
JRE 7 -> JDK 7
Hope this will solve your problem, If not do share the code.