Compilation issue with gwt-dnd-2.6.5.jar - Java 1.6


Recently I had to use an updated version of gwt-dnd-2.6.5.jar with Snow Leopard (Mac OS X 10.6). I was using Java 1.5 and I got below error, which indicates a class being compiled with a different Java version:
java.lang.UnsupportedClassVersionError: Bad version number in .class file


Solution: It turns out that gwt-dnd-2.6.5.jar is using Java 1.6, therefore I had use same Java version (Java 1.6) in my environment in order for my project to comile correctly.


1. Click Eclipse -> preferences -> Java -> installed JRE
























2. Click Eclipse -> preferences -> Java -> compile -> select 1.6





No comments:

Post a Comment