aserg-ufmg / RefDiff

A tool to mine refactorings in the commit history of git repositories.
MIT License
148 stars 44 forks source link

class file has wrong version 55.0, should be 52.0 #28

Closed gqqnbig closed 3 years ago

gqqnbig commented 3 years ago

As requested in README, I downloaded JDK 8 and build the repo. However Gradle refused to build.

$ export JAVA_HOME=~/jdk1.8.0_301/
$  ./gradlew build 

> Task :refdiff-java:compileJava
warning: unknown enum constant Include.NON_NULL
  reason: class file for com.fasterxml.jackson.annotation.JsonInclude$Include not found
error: org.eclipse.core.runtime.IProgressMonitor: bad class file: /home/qiqig/.gradle/caches/modules-2/files-2.1/org.eclipse.platform/org.eclipse.equinox.common/3.15.0/bd08027a06f7c62fa281cacd887daa2f590f20d0/org.eclipse.equinox.common-3.15.0.jar(org/eclipse/core/runtime/IProgressMonitor.class)
  class file has wrong version 55.0, should be 52.0
  Please remove or make sure it appears in the correct subdirectory of the classpath.
/home/qiqig/RefDiff/refdiff-java/src/main/java/refdiff/parsers/java/SDModelBuilder.java:28: error: cannot access IProgressMonitor
public class SDModelBuilder {
       ^
  bad class file: /home/qiqig/.gradle/caches/modules-2/files-2.1/org.eclipse.platform/org.eclipse.equinox.common/3.15.0/bd08027a06f7c62fa281cacd887daa2f590f20d0/org.eclipse.equinox.common-3.15.0.jar(org/eclipse/core/runtime/IProgressMonitor.class)
    class file has wrong version 55.0, should be 52.0
    Please remove or make sure it appears in the correct subdirectory of the classpath.
1 error
1 warning

> Task :refdiff-java:compileJava FAILED

Can you check the required JDK version?

rodrigo-brito commented 3 years ago

Hi @gqqnbig it works with Java 1.8. If you execute java -version and javac -version, does it displays 1.8 for both?

Please, try to clean your dependencies after switch to the new environment: ./gradlew clean