Splitter blows up on simple Pattern

后端 未结 3 1408
南笙
南笙 2020-12-19 04:21

I am just starting to us Guava in place of Google-Collections. The Splitter class seemed cool. But when I use it, like this:

private static final Pattern p =         


        
3条回答
  •  旧时难觅i
    2020-12-19 04:42

    The java.lang.NoSuchMethodError tells you that the desired method is missing in the current runtime classpath while it was there in the compile time classpath.

    In other words, to fix this problem you need to align your runtime classpath to have the correct version of the API as you used during compile time. It can also be caused by having different versions of the library mixed throughout the runtime classpath. Cleanup the classpath then.

提交回复
热议问题