Thursday, March 26, 2009

Java compile error with Ant or Maven

I hope you may have got the following error on some time of your programing career. When you compile some java files using your IDE, Ant, Maven javac etc this error may pop.

class file has wrong version 49.0, should be 48.0

The reason for this is one or more classes or java libraries in your classpath are not compatible with the current version of the java compiler. To fix this need download the latest JDK and set the JAVA_HOME to the new jdk.

Or else if you have the source of the library files it self you can rebuild the libraries using the current version of the JDK.

===============

No comments:

Post a Comment

Subscribe