title: java.lang.UnsupportedClassVersionError: myApp : Unsupported major.minor version 51.0 (unable to load class myApp) On Linux
body: <p>Recently I am the facing problem with Apache Tomcat 6.0.35 on Linux Centos.
  I am getting the error - </p>
  
  <pre><code>java.lang.UnsupportedClassVersionError: myApp : Unsupported major.minor version 51.0 (unable to load class myApp)
  </code></pre>
  
  <p>When I give the command - </p>
  
  <pre><code>java -version
  </code></pre>
  
  <p>It Shows</p>
  
  <pre><code>java version "1.6.0_22"
  OpenJDK Runtime Environment (IcedTea6 1.10.9) (rhel-1.28.1.10.9.el5_8-x86_64)
  OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)
  </code></pre>
  
  <p>Similarly When I give the command - </p>
  
  <pre><code>javac -version
  </code></pre>
  
  <p>It shows - </p>
  
  <pre><code>javac 1.6.0_22
  </code></pre>
  
  <p>To locate the Java I give the command - </p>
  
  <pre><code>whereis java
  </code></pre>
  
  <p>The output is - </p>
  
  <pre><code>java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
  </code></pre>
  
  <p>And for </p>
  
  <pre><code>which java
  </code></pre>
  
  <p>It displays - </p>
  
  <pre><code>/usr/bin/java
  </code></pre>
  
  <p>Also for </p>
  
  <pre><code>which javac
  </code></pre>
  
  <p>Output is</p>
  
  <pre><code>/usr/bin/javac
  </code></pre>
  
  <p>Where <strong>myApp</strong> is java project developed in Windows and Uploaded the WAR file in Tomcats' <strong>webapp</strong> directory on <strong>Linux</strong>.</p>
  
  <p>I am not getting what is happening? Please can anybody please help me to resolve the problem?</p>
  
  <p>Thanks in advance.</p>