Q:

ant executes within eclipse but not from the command line

I have a really basic question about ant. When I execute the build.xml file within Eclipse with 
Run as -> Ant Build
Then everything works fine. However, when I try to run the same build.xml file from the command line like
ant -f build.xml
Then for same classes I get errors like: 
Error: `package com.sun.image.codec.jpeg` does not exist

Any ideas, what should I do?
Thanks

A:

as its clear from the error its talking about package com.sun.image.codec.jpeg does not exist which is not present.
Whats happening in case of eclipse is that that jar/package is there in build path of project as a result of which its getting included in build process from eclipse.
As a solution try to include that jar file in build path of ant i.e. put that url in ant script and then try building the project from terminal. It should work.

