jar in a jar

hello, i am trying to deploy my game as a jar.

it has some dependencies to other jars, so i was wondering if it is possible to put them all together in one jar.

so i have my game code in the main-jar and also in the jar is a lib-directory that contains other jars. the manifest looks like this:

Main-Class: com.packagename.TestClient
Class-Path: lib/library.jar lib/any.jar lib/some.jar

unfortunately when executing the jar it complains about not finding the libraries. what did i do wrong?
thanks!

Try un-jarring the library jars then re-jarring your code and the uncompressed library folders into a new jar. (NB some libraries don’t like being obfuscated so you might have to exclude these from the obfuscation step if you’re obfuscating)

thanks that worked!