Issue working with nested Java libraries

192 views Asked by At

I have a plain old Java project that uses a third party library: that is, a third party JAR added to its build path. I have exported the library as a JAR, added it to another plain old Java project's build path and when I run the project, I'm getting a Could not find class error for a class which is in the third party JAR library, not mine. That is, the exception is getting thrown in MY JAR file because it cannot find a class in the THIRD PARTY JAR which is contained IN my JAR.

I noticed that I can fix the issue if I also add the third party JAR to the original project's build path, but I really do not want to do that. I just want my JAR to be self contained and keep the third party JAR in it. Is there a way to do this?

0

There are 0 answers