How to exclude a folder that is producing warnings/errors in an Eclipse project?

后端 未结 8 1435
长发绾君心
长发绾君心 2020-12-08 01:48

Okay. I\'m sick of this problem. This has to have an easy fix, I\'m sure of it!! I hope SO can help me to get rid of this once and for all!

8条回答
  •  甜味超标
    2020-12-08 02:27

    Go to Java Build Path -> Source -> Add Folder

    Choose the right folders which needs to be part of Build Path

    In the above Screen shot src/main/resources needs to be removed from the build as it results in compilation error [wrong package ID]. Hence Include the Folder till src/main/resources .

    I did try Build Path -> Exclude. This does not actually solve the problem. i.e though the RedX mark is cleared from the Eclipse, it will no more be right Java projects. I.e user may not be able to run JUnit Test cases/ debug etc.

    But by including right folders, we can continue with as Java Project.

提交回复
热议问题