title: How to solve javax.servlet.ServletException: java.lang.UnsupportedClassVersionError?
body: <p>I have downloaded a web application project onto my Mac OSX 10.8.2 and I am using the Apache <code>ant</code> to compile it. I am getting this error when the application is running, attempting to compile-and-execute a JSP:</p>
  <pre><code>javax.servlet.ServletException: java.lang.UnsupportedClassVersionError
  Unsupported major.minor version 51.0
  </code></pre>
  <p>I have searched for this problem on the web, and it seems this problem is caused by the compiled version being different from the running version of Java. All the suggested solutions are to &quot;set the compiler version in Eclipse,&quot; but I am not using Eclipse...</p>
  <p>This is my environment:</p>
  <pre><code>java version &quot;1.7.0_05&quot;
  Java(TM) SE Runtime Environment (build 1.7.0_05-b06)
  Java HotSpot(TM) 64-Bit Server VM (build 23.1-b03, mixed mode)
  </code></pre>
  <p>How can I check the ant-compiled version(s) of my class files and resolve this problem?</p>