I recently ran into Apache Tomcat 6.0.35 on Linux Centos. I get an error -
java.lang.UnsupportedClassVersionError: myApp : Unsupported major.minor version 51.0 (unable to load class myApp)
When I give a command -
java -version
Shows
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)
Similarly, when I give the command -
javac -version
He shows -
javac 1.6.0_22
To find Java, I give the command -
whereis java
Exit -
java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz
And for
which java
Displayed -
/usr/bin/java
Also for
which javac
Exit
/usr/bin/javac
Where myApp is a java project developed on Windows and the WAR file is loaded into the Tomcats Linux webapp directory.
I do not understand what's going on? Please someone please help me solve the problem?
Thanks in advance.
java linux tomcat
Deepu
source share