Creating a separate Folder in the same package… [ECLIPSE]

后端 未结 5 1709
一向
一向 2021-02-06 05:58

Is it possible in Eclipse to create a separate Folder in a package? When select \"new --> folder\", my eclipse version always creates a package. But i want the new folder to be

5条回答
  •  隐瞒了意图╮
    2021-02-06 06:42

    You want to create a new child package (bar) of the existing package. (com.foo)

    Select new package and name it "com.foo.bar". Eclipse will correctly place it under com.foo.

    FYI: Folders under any "source" folder are shown as packages. There is no physical difference except that they appear on the build path. As shown elsewhere you can exclude them but it's easier to just not put them under /src/... to begin with.

提交回复
热议问题