简体   繁体   English

将程序包分配给现有项目的新子文件夹

[英]assigning package to a new subfolder of an existing project

I have already all a series of folder of an existing project in java. 我已经在Java中拥有一个现有项目的所有一系列文件夹。

this is the tree folder: 这是树文件夹:

-org
 -w3c
  -jidadmin
  -jigsaw
  -ecc...

I would create a new folder inside w3c in the way that all java files inside my new folder will belong to package org.w3c.myfolder . 我将在w3c内创建一个新文件夹,使新文件夹内的所有java文件都属于org.w3c.myfolder包。 I tried with eclipse to put inside src folder my new java file package org.w3c.myfolder but eclipse creates inside src folder the path org.w3c.myfolder 我尝试使用eclipse将src文件夹放入新的Java文件包org.w3c.myfolder,但是eclipse在src文件夹中创建了路径org.w3c.myfolder

I think you're just confused by the fact that Eclipse displays packages in a flat way by default, rather than displaying them hierarchically, as folders. 我认为您对Eclipse默认情况下以扁平方式显示软件包而不是将其作为文件夹分层显示的事实感到困惑。 Click on the small triangle icon in the package explorer if you prefer a hierarchical view. 如果您喜欢分层视图,请单击包浏览器中的小三角形图标。

在此处输入图片说明

在此处输入图片说明

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM