I have a large project which is build using Java 1.6 and I can not update its build path to Java 1.8 because it causes too many compile errors.
I have to use an external library (underscore) https://mvnrepository.com/artifact/com.github.javadev/underscore/1.73 which is build using Java 1.8 and it seems it is not backwards compatible.
When I try to compile I get the following error for a sample code:
import com.github.underscore.lodash.U;
public static void main(String args[]) {
U.xmlToJson("foo")
}
I get the following errors:
cannot access com.github.underscore.lodash.U bad class file has wrong version 52.0, should be 50.0. Please remove or make sure it appears in the correct subdirectory of the classpath.
The runtime can be 1.6 or 1.8 it is not problem, the main problem is the compile process fails.