您的位置:首页 > 移动开发 > WebAPP

Eclipse maven webapp项目目录结构配置 java build path 出现问题

2015-12-30 00:00 991 查看
摘要: Creating a src/main/java folder structure in Eclipse without Maven

[code=plain]How do I create the src/main/java and src/test/java in my default web application
project in Eclipse without Maven? My current folder structure is

TestApp
-JavaResources
- src
- com.mypackage
-WebContent

Answers
As you've discovered, you can't have a source folder inside another source
folder, so before you can create src/main/java you have to tell Eclipse
not to treat src as a source folder. To do this,
right click on the src folder and select build path -> remove from build path.
Once you have done this src will appear in the folder tree in its normal place,
so you can create the main and java folders under it,
and move the existing src/com to src/main/java/com. Finally right-click the
newly-created java folder and select build path -> use as source folder.

上图:

内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: