How does JVM deal with duplicate JARs of different versions

后端 未结 2 1495
别跟我提以往
别跟我提以往 2021-01-17 22:42

When there were duplicate JARs with different versions, the behavior was very inconsistent. Does anyone know how the JVM deals with duplicates?

2条回答
  •  Happy的楠姐
    2021-01-17 23:33

    FWIW, this is an example of a larger topic (modularity) that is addressed by OSGi and Project Jigsaw/JSR 294 in JDK 7 Java 9.

    Your question is good motivation for the topic: the venerable, simple classpath may have been a good idea at its inception, but it is certainly a pain point in today's age of high dependence on 3rd-party-libraries.

提交回复
热议问题