A: 

Eclipse's root classloader contains a lot of classes, when you run ant from console there's much less.

Just tell javac task to use the required .jar, and you'll be fine.

alamar
The Jar needed is an external Jar unrelated to eclipse, which I have specified as a path element, along with a number of other external Jars I'm using.
Monster
A: 

You should post the stack trace, does it say "import required by ..."? ( I forget the exact text). Likely there's a jar that's available in your eclipse environment that is not included in your ant script. Look in the stack trace for the missing class to identify the jar that's not being included in your build.

Steve B.
As I said to the above, it's an external Jar. A source file is using an import carried by that particular Jar file, and for some reason, it can't find it (the location the import points to, not the jar).
Monster
+1  A: 

Wow, the solution was completely unrelated. It was a dumb fault in the java code where the class was trying to import .* from a directory that only had folders in it. For some reason, Eclipse didn't seem to mind, but javac did!

Monster
That's because eclipse is using a different java compiler.
alamar