It was a mistake of my co-worker: there was a jar named test.jar and he has fixed a bug of it. Then he re-compile the code and built a new jar named testnew.jar The proble
If there are duplicates, it reads the one which appears first in your classpath.
Edit A classpath file in general looks something like this..
If your classpath looks something like above, then your JVM will look into test.jar first, as it appears first in the classpath. If you want to test it on your own, try moving the classpathentry for testnew.jar above the entry of test.jar. You will see that it now refers testnew.jar instead of test.jar.
Reference: FindingClasses