Linking external source folder with name “src” in an eclipse project

后端 未结 3 1544
北恋
北恋 2021-01-18 05:09

This is NOT a question about linking source in eclipse java project

Is it possible to add an external folder named \"src\" in eclipse as the source

3条回答
  •  青春惊慌失措
    2021-01-18 05:27

    You need to use Eclipse to remove the existing source folder from the project configuration, then delete it from the file system, then you can add the externally linked source folder as "src".

    1. Right-click on the project and bring up "Properties..."

    2. Click on "Java Build Path" and then the "Source" tab to show a list of the source folders on the build path.

    3. Select "yourproject/src" and click the "Remove" button. This will remove it from the project (and the .classpath file).

    4. Come out of it and physically delete the folder.

    5. Go back to that dialog box and this time click "Link source...". It should work now. It works for me.

提交回复
热议问题