UnsupportedClassVersionError: Bad version number in .class file
Posted on 2014-01-04
I have a real problem I can't seem to figure out. I am using MyEclipse 2014 however I was originally using 9.0 and thought upgrading might solve the problem but it did not.
I am compiling inside of MyEclipse using Jdk1.6.0_45. I have checked all references on Tomcat 6.0 and within MyEclipse and all are using the same JAVA version. As a matter of fact it is the only version of JAVA on the server. I pointed MyEclipse to a full version of Tomcat 6.0 however prior to this I tried it with the MyEclipse sandbox version of Tomcat with the same results. I can run the web app using MyEclipse sandbox Tomcat and my full version of Tomcat and everything works fine but if try to fire up Tomcat outside of MyEclipse I get the bad version number class file error. This is really confusing because it is the same Web Server and files used by MyEclipse. I know this error can occur when the build JDK version is different than what is used by Tomcat but this is not the case and once again it works perfectly inside of MyEclipse using the same Tomcat but errors when I fire Tomcat up outside of MyEclipse. I have also tried to put the build on two other servers using Tomcat 6.0 with the same results.
Please any suggestions would be appreciated because I have checked every possible configuration I can think of.