0

I have a requirement for the below scenario:

I am using plugin and It has 3 jar versions. All the jars are needed in my requirements. But the issue is in all the jars the package name and class name are same (But the content of the class is different for different version). So, It's giving me error Could not resolve the type while I am trying to use the class.

Can anyone suggest me how to resolve the problem.

Thank You!!!

iti
  • 21
  • 7

1 Answers1

0

The only way to do this is to use multiple class loaders and load each version of plugin.jar using a different UrlClassLoader.

For more information on how to load jar at runtime using UrlClassLoader, refer to How should I load Jars dynamically at runtime?