There are many questions as How to fix java.lang.NoSuchMethodError on SO.
As I can see, the simplest way to get this error, is to make a clas
Create a class file from a class which calls java.util.Properties.load(Reader)
in its main method with some Java version >= 1.6.xxxx.
Attempt to execute this class using some Java version < 1.6.xxxx
Reason: java.util.Properties.load(Reader)
was introduced in Java 6. It is being called, but does not exist in this version of Java.
This applies similarly to all methods introduced to the default language libraries in updates.
NoSuchMethodError happens if one class expects a method in another class (and was compiled with that method in place), but at runtime the other class does not have that method. So you need to:
Then, if you run the first class (with main method), it will throw that error when trying to call the method on the 2nd class (the method no longer exists)
This example would rarely happen in the real world though. Here are some real cases when the error occurs: