Eclipse java debugging: source not found

后端 未结 30 1678
Happy的楠姐
Happy的楠姐 2020-11-22 15:43

While debugging a java app in eclipse I receive a \"Source not found\" error in two cases:

  • Stepping in to a file in a different project which
30条回答
  •  忘了有多久
    2020-11-22 16:44

    I had similar problem with my eclipse maven project. I fought with this issue quite a long time then I tried to rebuild project with

    mvn clean eclipse:eclipse
    

    and it helped.

    Note: Using this approach will confuse the m2e plugin since the two approaches are very different. m2e adds a virtual node to your project called "Maven Dependencies" and asks Maven to add all dependencies there.

    mvn eclipse:eclipse, on the other hand, will create a lot of individual entries in the file .classpath. Eclipse will handle them as if you manually added JARs to your project.

    Unless you know how the classpath in Eclipse works, this approach is not recommended.

提交回复
热议问题