I've added a bit of sharepoint code towards the existing java file that was producing and dealing fine. The sharepoint code that's written uses a few of the exterior libraries. Now I have to add the exterior library towards the existing project through ANT.

I've done a couple of adjustments to the build.xml file and therefore resolved all of the compilation errors. However, if the code gets performed, I recieve a mistake message saying "java.lang.NoClassDefFoundError: internet/entropysoft/eci/spi/IContentProviderFactory". Help me solving this error.

Also please tell me what must be put in the build.xml file to solve the mistake. All of the jar files exists within the directory "externallibs"

Thanks, Rajath

You must have all of the jars within the classpath when running the applying:

java -cp externallibs/* com.foo.bar.Main

Whether it's a JEE web application, the build process should copy each one of these jars towards the WEB-INF/lib folder from the produced web application structure.

java.lang.NoClassDefFoundError: net/entropysoft/eci/spi/IContentProviderFactory does not necessarily mean the course net.entropysoft.eci.spi.IContentProviderFactory isn't found. This means the course that's used in this particular class aren't found any place in the classpath. This error is tossed once the class loader is attempting to load the course however it cannot correctly initialize the course definition.

To resolve this issue, you will have to consider the source code from the class net.entropysoft.eci.spi.IContentProviderFactory, usually in the import section, and discover what may be the missing Java class and which library the missing class is within. Knowing you can include that library for your classpath while using answer by JB Nizet. Should you run it from IDE, then you will have to include that library for you build.xml.