maven “cannot find symbol” message unhelpful

后端 未结 15 1927
挽巷
挽巷 2020-11-28 12:11

This is a really simple question, and it\'s probably a setting somewhere I don\'t know about, but Google is being particularly unhelpful for this question, giving results ab

15条回答
  •  青春惊慌失措
    2020-11-28 13:12

    I had the same problem. The reason was that I had two JAR files were not added through the Maven dependency, so when I ran mvn compile, the console display the error error:

    Symbol cannot be found,Class...".

    To fix it:

    1. Remove the JAR files from build path
    2. Add to build path
    3. Run mvn compile

提交回复
热议问题