Eclipse Error ... Cannot Be Resolved to a Type

Eclipse error ... cannot be resolved to a type

  1. Right click your project name.

  2. Click Properties.

  3. Click Java Build Path.

  4. Click on Add Class Folder.

  5. Then choose your class.

Alternatively, Add Jars should work although you claim that you attempted that.

Also, "have you tried turning it off and back on again"? (Restart Eclipse).

Eclipse throws the error Data cannot be resolved to a type for using the Project Lombok

Posting the answer as it maybe useful for somebody in the future.

As mentioned in the comment removed/deleted the file module-info.java which was created by default during the project creation. Everything worked as expected.

Eclipse error: The import XXX cannot be resolved

I found the problem. It was the hibernate3.jar. I don't know why it was not well extracted from the .zip, maybe corrupt. A good way to check if jars are corrupt or not is navigating through their tree structure in "Project Explorer" in Eclipse: if you can't expand a jar node probably it's corrupt. I've seen that having corrupt packages it's frequent when you drag and drop them to the "Project Explorer". Maybe it's better to move and copy them in the OS environment! Thankyou all.



Related Topics



Leave a reply



Submit