0

I have a project which depends on two jars. The first jar uses the package name com.acme.storage. The second jar provides some other functionality, but also depends on a third jar. This third jar also uses the package name com.acme.storage, and has classes whose names clash with those in the first jar.

I cannot change the package names in either the first or the third jar; can I compile the second jar so that it includes, but does not expose, the third jar?

I'm using sbt, so it would be helpful to know how do to do this with sbt too.

Squidly
  • 2,707
  • 19
  • 43
  • You may need to try custom `Classloader` to load your jars :) . – Viswanath Lekshmanan Mar 21 '16 at 12:00
  • Try accepted answer given in this question [how-should-i-load-jars-dynamically-at-runtime](http://stackoverflow.com/questions/60764/how-should-i-load-jars-dynamically-at-runtime), to load both jars with different classloader. – Mahendra Mar 21 '16 at 12:10

0 Answers0