I just got confused with my Eclipse project, the java code file appears strange like this:
It should be look like this:
Does anyone know what is the difference of those java file? And how do I resolve this problem? Thanks and regards.
I know this is a little late, but i had the same problem and couldn't run anything, so I did some research and found the problem was as said by Sergey, I fix it by right clicking in the Project > Build Path > Configure Build Path > Source
then deleting the source path and adding the new source path, the project location. Hope it works, it worked for me
It's related to how Package Explorer
is showing the project content. The second one (solid blue J
icon) shows Java source code while the first one shows just a folder structure with any files in it (Java files in this case). Meaning that if you fail to see the second one then your project is in trouble since there's no source code folder configured.
You could check you project sources by right click on project > Java Build Path
> Source
If you want to avoid confusion then I'd recommend to use the Navigator
view over the Package Explorer
view cause the former shows your folder structure as it is w/o any modifications.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With