How do I fix a NoSuchMethodError?

前端 未结 29 2841
孤独总比滥情好
孤独总比滥情好 2020-11-21 05:08

I\'m getting a NoSuchMethodError error when running my Java program. What\'s wrong and how do I fix it?

29条回答
  •  死守一世寂寞
    2020-11-21 05:51

    If you have access to change the JVM parameters, adding verbose output should allow you to see what classes are being loaded from which JAR files.

    java -verbose:class 
    

    When your program is run, the JVM should dump to standard out information such as:

    ...

    [Loaded junit.framework.Assert from file:/C:/Program%20Files/junit3.8.2/junit.jar]

    ...

提交回复
热议问题