It is sometimes required to change the default source folder working on the java project. One best example for this could be when normalizing the project to maven.
mvn标准工程是 src/main/java src/main/resource and the like one, you might need to change it.
1、首先将你的工程src目录下建立目录main,然后分别新建目录 java 和 resource
2、刷新 right click on the project, and hit refresh, make sure the folders you created are listed there.
3、Right click on the project, select properties and select java build path
4、 Go to source tab
5、. select and remove the current source folder, by default it would be src folder
6、. Hit the Add newthen select your folder structure there.
时间: 2024-10-19 19:24:07