Why is my Eclipse Java package being treated as a folder?

后端 未结 14 919
失恋的感觉
失恋的感觉 2021-01-04 00:14

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

14条回答
  •  不知归路
    2021-01-04 00:22

    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.

    Eclipse Screenshot

提交回复
热议问题