Java, Classpath, Classloading => Multiple Versions of the same jar/project

前端 未结 5 1988
隐瞒了意图╮
隐瞒了意图╮ 2020-11-22 12:13

I know this may be a silly question for experienced coders. But I have a library (an http client) that some of the other frameworks/jars used in my project require. But all

5条回答
  •  情话喂你
    2020-11-22 12:57

    Classloader will load classes from the jar that happened to be in the classpath first. Normally, incompatible versions of library will have difference in packages, But in unlikely case they really incompatible and can't be replaced with one - try jarjar.

提交回复
热议问题