My Eclipse Java package is treated as a folder; can anyone suggest what\'s wrong?
Creating a package makes an older one instead.
I had the same problem, and I was not able to solve it. But I suggest this, as a possibility. After copying and moving classes between packages, any file, it could be that the classpath has different information and that it hasn't been updated.
After having read some comments above, I now am only using source folders instead the standard source Folder "src". Inserting packages in any new source folder always runs.
i had the exact same Problem after i added the packege in java build path -> libraries -> add class folder...
Dont ask why i did this ^^ but to resolve the Problem i just had to go to Project->Properties->java build path->Source
And there it was in the Excluded part. Just remove it from the exclusion pattern and perhaps also from the libraries section.
Right click on Project > Configure > Convert to Faceted Form > Click on apply and OK
This one has worked for me.
go into your javabuildpath in properties and remove the folder from your Exclusions
No Need of delete, re-create etc.
Just modify .classpath file
<classpath>
<classpathentry kind="src" output="target/classes" path="src/main/java">
<attributes>
........
First, ensure that you're in the "Package Explorer" view of the Java Perspective.
Secondly, it needs to be made a Source Folder.
If you're in the Java Project, right click on the folder and select "Build Path" > "Use as Source Folder"
Something like what is shown here:
Observe that I am in Java perspective and see how the style of the folders "source" and "src" are different in appearance.