Solution:
As far as I can understand, you imported the project as a general project. That’s the reason your project missing the java nature and producing the error. Either you need to add java nature in your program manually in the .project file of your workspace or go through the GUI to fix the error.
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
Or go through your IDE
- Right-click on your project
- Go to "Properties"
- Choose "Project Natures"
- Click on "Add"
- Choose "Java"
- Click "Apply and Close"
Boom! Your problem should fix now. Give it another try and let me know here the update.
Thanks.