I have two different JAR files, dependent.jar and independent.jar
dependent.jar gives a java.lang.NoClassDefFoundError when run, and requires classes from independent.jar to execute successfully. However, I cannot figure out a way to include independent.jar in the class path of dependent.jar
I tried using the command
java -cp independent.jar -jar dependent.jar
However, the -cp
option is ignored when used with -jar
option.