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

后端 未结 3 1507
北恋
北恋 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:23

    To make link with external folder, we need to rename the folder if any folder already exists with same name like "src" or better delete that folder. After that you can make link with the external folder using the anyone of the following method:

    Method: 1 - (Make link manually via code):

    1. Open the .project file from root folder of your workspace.
    2. Include the below code with your file path:
        
            
                folder_name_list_in_your_project
                2
                folder_path_to_include
            
        
    3. Save the file and refresh the project to include the external folder in your project.
    

    Method: 2 - (Make link manually via UI):

    1. Right click the project, select "Build Path -> Configure Build Path".
    2. Choose "Source" tab.
    3. Click "Link Source" button.
    4. Click "Browse" to choose the folder.
    5. Enter the folder name in "Folder name" field to list the external name in your project.
    6. If you need to add the pattern for include and/or exclude file, click "Next" and enter the pattern. Then click "Finish".
    7. Otherwise click "Finish".
    

    It works for me and hope that my steps also help you.

提交回复
热议问题