posted 14 years ago
Notice that you said your classpath was a long list of jars. Which of those jars is your Main.main class in?
None of them, right? So it isn't in anything which is in your classpath. Hence the error message.
Presumably it's in the current working directory, and that's why the simple version works; the default value of the classpath is simply the current working directory and nothing else. So (if that's the case) just add the current working directory to the classpath, along with that list of jars.