Reputation: 4156
My MANIFEST.MF in my application jar contains the following line:
Class-Path: other.jar
My directoy contains the followign files at the same level:
- myApp.jar
- other.jar
I run my application using
java -jar myApp.jar
and get a NoClassDefFoundError for a class which is in other.jar
What am i missing please?
Upvotes: 0
Views: 402
Reputation: 4156
Turns out the issue was outside of the manifest file. I had an autogenerated index.list file next to it which blocks classpath from being read.
Upvotes: 1
Reputation: 11
Is your Class-Path the last line in the Manifest file?Then it should have an extra line at the end. It may not read the class-path if there is no carriage return in the end.
Upvotes: 0