How to Make a JAR File Not Execute

| No Comments

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!

About this Entry

This page contains a single entry by Christian published on July 14, 2004 12:37 PM.

Estimates: a Useful Tip was the previous entry in this blog.

Fun with Cold Fusion Regular Expressions is the next entry in this blog.

Find recent content on the main index or look in the archive to find all content.