The class (or package) could be mis-named. This probably isn't it because you could compile. But I have seen things like this when I renamed a class or package and ended up with both old and new named versions hanging around - maybe one version didn't make the jar.
Or maybe the jar has the wrong path in it. If your package starts with "com.foo" then the stuff in the jar should be "com/foo". Look at the output of jar tf ....
Or maybe you have the
FiLeNaMe case incorrect. If you are on Windoze, then the filesystem doesn't care so
java gives you some slack. But once you stick the thing in the jar if the
NaMe in the jar doesn't match the
Name of the class it probably won't find it at runtime.