Sometimes one can spend way too much time on silly deployment issues. Case in point, after adding another JAR file to my application, I start getting:
Exception in thread "main" java.lang.NoClassDefFoundError: com.example.Foo
Welll, of course Foo is in the JAR file. Whether I try java -jar
or java -classpath
, I get the same error.
After scratching my head for a bit and double-checking for silly user errors (yup, there is a manifest file in the right place), I figure I'll have to check Sun documentation on manifests.
..where I discover that the Class-Path
header takes JAR files separated by spaces. Nothing wrong with that, but I had been using colons. D'oh!