Eclipse IDE cannot resolve to a type. All values.

My IDE is showing errors all over my screen. Mainly, all the methods are showing errors that say 'cannot be resolved to a type.'. I know this has something to do with the build path, but I can't seem to fix it. Any help?
No description
No description
23 Replies
JavaBot
JavaBot13mo ago
This post has been reserved for your question.
Hey @AbuAbed! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
AbuAbed
AbuAbedOP13mo ago
Oh, and all the code was imported from a gitlab repository, and I cannot run any of it because of this error.
No description
dan1st
dan1st13mo ago
Can you check the build path? Right click on the project and select Build Path>Configure Build path specifically the Libraries tab - what's in there?
AbuAbed
AbuAbedOP13mo ago
@dan1st | Daniel This is what's in there.
No description
dan1st
dan1st13mo ago
Did you install a JDK on your computer? If so, Eclipse doesn't know about it (or it only finds JDKs <17)
AbuAbed
AbuAbedOP13mo ago
I have JDK 21.0.1 installed. A previous version of Eclipse works without issues, but this is the 2022-12 version and I just started working on it.
dan1st
dan1st13mo ago
ok select JRE System library then select Edit on the right
AbuAbed
AbuAbedOP13mo ago
Then?
dan1st
dan1st13mo ago
what's shown?
AbuAbed
AbuAbedOP13mo ago
No description
AbuAbed
AbuAbedOP13mo ago
No description
dan1st
dan1st13mo ago
select Installed JREs
AbuAbed
AbuAbedOP13mo ago
No description
dan1st
dan1st13mo ago
ok you have it there then you can apply and close that and select that JDK under Alternate JRE
AbuAbed
AbuAbedOP13mo ago
Like this?
No description
dan1st
dan1st13mo ago
yes apply and close the whole thing including the build path modal
AbuAbed
AbuAbedOP13mo ago
All of the errors are gone now. Thanks for that, now I have the other problem mentioned at the top.
JavaBot
JavaBot13mo ago
If you are finished with your post, please close it. If you are not, please ignore this message. Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
dan1st
dan1st13mo ago
ok so do you have a main class?
AbuAbed
AbuAbedOP13mo ago
Yes I do. Do I launch it from there?
dan1st
dan1st13mo ago
right-click the main class and select Run As>Java application that should run the main class specifically
AbuAbed
AbuAbedOP13mo ago
Oh alright I believe that's all, thanks again!
JavaBot
JavaBot13mo ago
Post Closed
This post has been closed by <@299947216641064960>.
Want results from more Discord servers?
Add your server