Java – how to resolve jar conflicts at run time?

I have two jars in conflict They all contain a class with the same package name and class name For the same reason, I can't delete any of them

So, is there any way to solve this problem? Ideally, I want a way for me to decide which jar class to call at run time

I am very grateful to anyone for their help

Solution

You can create a package structure with different names and project folders (the same as the package structure in the conflicting jar) Copy the contents from any jar Use one package in the jar and another package in the project (the new package just created)

Good luck!

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>