Eclipse compilation error: The hierarchy of the type 'Class name' is inconsistent

后端 未结 23 2509
遥遥无期
遥遥无期 2020-12-04 15:53

I have downloaded some open source software written in Java and tried to compile it using Eclipse. I got the error: \"The hierarchy of the type \'Class name\' is inc

相关标签:
23条回答
  • 2020-12-04 16:33

    I had to switch from Eclipse Oxygen that I got from IBM and used IBM JDK 8 to Eclipse Photon and Oracle JDK 8. I'm working on Java customizations for maximo.

    0 讨论(0)
  • 2020-12-04 16:39

    It means you are trying to implement a non-existing interface or you're extending an non-existing class.

    Try to refresh your Eclipse.

    If it doesn't work, it may mean that you have a reference to a JAR that is not in the build path. Check your project's classpath and verify that the jar containing the interface or the class is in it.

    0 讨论(0)
  • 2020-12-04 16:39

    if you are importing the eclipse project just 1. Go to the java build path setting under the project properties. 2. In case the JRE System library has an error sign attach to it double click it to open the Edit library window 3. Change the execution environment to the correct java version of the system or choose edit the other settings by checking the radio buttons assign to them. 4. Click finish

    0 讨论(0)
  • 2020-12-04 16:41

    For me it was changing the Android API level to one with Google APIs

    0 讨论(0)
  • 2020-12-04 16:42

    Sometimes it happens when you add a jar that YOU need, but don't include the jars that IT needs. In my case adding all the jars in tomcat/lib helped me to solve this problem. I am working on a web-app.

    0 讨论(0)
  • 2020-12-04 16:43

    I had a class that extends LabelProvider in a project with OSGi, there the error occured. The solution was: Adding org.eclipse.jface to the required plugins in the manifest.mf instead of importing the single packages like org.eclipse.jface.viewers

    0 讨论(0)
提交回复
热议问题