I have a jar called x.jar
all of the jar's dependencies are placed inside the jar using maven-shade-plugin.
I also previously tried using maven-assembly-plugin or maven-one-jar-plugin
in y.jar I try using a Class-loader like presented in the following question: How should I load Jars dynamically at runtime?
when i load x.jar into y.jar in runtime, it cannot find the library dependencies inside of y.jar, so it crashes.
how do i load x.jar in a way that it works as a class library with all of its dependencies?
EDIT:
- running the library statically from another project works fine and all of the dependencies work ok.
- adding the dependencies into y.jar solves it, but i do not want them there.
- i do not want y.jar to know about x.jar dependencies