What does UnsupportedClassVersionError mean ?

Sometimes you can meet a strange java.lang.UnsupportedClassVersionError exception. As we can read at Javadoc, this exceptions is thrown when the JVM's JDK doesn't support JDK used to compile the class file. For example, if you compile your code with Java 1.7 and try to run it in servlet container supporting JDK 1.6, this exception can occur.

How to solve this issue ? Normally, recompiling the class to the version supported by your servlet container should correct the exception.

When you're working on Eclipse, the messages like "Unsupported major.minor version 51.0" refer to UnsupportedClassVersionError

.