Problem loading resources while running in Eclipse

前端 未结 7 1959
[愿得一人]
[愿得一人] 2021-01-06 05:56

I\'m working on a swing project, using maven2 (from command-line) and eclipse (without maven integration). So, I generate the eclipse project through maven eclipse plugi

7条回答
  •  说谎
    说谎 (楼主)
    2021-01-06 06:34

    I think you have to add src/main/resources to the build path. This is done in Project Properties > Build Path > Source. Here is how the standard maven project looks:

    enter image description here

    In future when using Eclipse I suggest to use m2eclipse plugin and create project using it. This will automatically make sure that all these folders are in the build path.

提交回复
热议问题