0

I got a java project (P) that uses the version 1.0 of a library A.

In this project I want to include a jar (B), that uses a newer version of the library A (A_2.0).

Being a newer version, the library A_2.0 contains a method (M) that is not implemented in A_1.0 yet.

When I run the project P, it fails when calling the jar B.

It says "java.lang.NoSuchMethodError: method M"

I suppose he's trying to pull this method off A_1.0, and not from A_2.0, which is strange to me since B should try to resolve its dependencies internally.

Am I missing something? Or, how can solve the problem without importing A_2.0 into P?

Thanks alot!

EdoSan
  • 1
  • 1
  • Does this answer your question? [Java, Classpath, Classloading => Multiple Versions of the same jar/project](https://stackoverflow.com/questions/6105124/java-classpath-classloading-multiple-versions-of-the-same-jar-project) – jannis Jun 18 '21 at 18:25

0 Answers0