Check this link
java.lang.UnsupportedClassVersionError: why is it thrown & how to resolve?
How to resolve UnsupportedClassVersionError?
Whenever you encounter this error, do check if you’re using an earlier
version of JVM to execute the class file than the corresponding
version of compiler you used to compile the source code. The example
shown here was compiled using Java 5.0 compiler, but when I tried to
run using JVM 1.4, I got the above error. I just needed to switch
either to a JVM version 5.0 or above OR needed to switch to a Java
Compiler of JDK 1.4 or below (you of course need to make sure the
source code is compatible with the corresponding version of the
compiler otherwise you’ll start getting other compiler errors).
A higher JVM version doesn’t cause a problem in most of cases unless
the class file format is quite old (and hence doesn’t lie in the
supported range as specified by Sun for that particular JVM version
... as discussed above). But, it’s always a good practice to have both
the Compiler and the JVM of the same version.
class Teswih}at the end of the code, plus I think you meant to name the class asTestwithTesbut missed atlike I missed atin the firstwithof my sentence.My missingtis not important but yours will be.