My Eclipse Java package is treated as a folder; can anyone suggest what\'s wrong?
SIMPLE You are not in the Package Explorer View ( but in Navigator view) If not the above case, then create a new package under the project (staying in Package Explorer view) and move those classes to the newly created package. DONE.
This kind of issue occur due to missing of java and test folder in the web application
solution is :
Right click on the project folder -> properties -> java build path -> order and export and select the java and test folder and add or apply -> ok
then you should able to add the package in the java folder
I tried mvn eclipse:eclipse and it worked. One to watch out is the .project file.
Just switch to java perspective, in the ide (top right corner-> java...)
Worst case, you'll have to delete the folder and recreate as a java package.
From the menu bar, select Navigate > Show In > Package Explorer.
This is what worked for me.