Why is my Eclipse Java package being treated as a

2019-04-03 23:41发布

My Eclipse Java package is treated as a folder; can anyone suggest what's wrong?

12条回答
欢心
2楼-- · 2019-04-04 00:16

Right click on Project > Configure > Convert to Faceted Form > Click on apply and OK

This one has worked for me.

查看更多
Luminary・发光体
3楼-- · 2019-04-04 00:17

go into your javabuildpath in properties and remove the folder from your Exclusions

查看更多
男人必须洒脱
4楼-- · 2019-04-04 00:19

From the menu bar, select Navigate > Show In > Package Explorer.

This is what worked for me.

查看更多
Root(大扎)
5楼-- · 2019-04-04 00:20

Worst case, you'll have to delete the folder and recreate as a java package.

  • Save the Java classes somewhere else in your Java project by refactoring
  • Delete the folder and the underlying folder structure
  • Create a Java package
  • Move the Java classes back under the Java package by refactoring
查看更多
该账号已被封号
6楼-- · 2019-04-04 00:20

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.

查看更多
萌系小妹纸
7楼-- · 2019-04-04 00:20

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.

查看更多
登录 后发表回答