Softprayog.in

Problem while installing JDOM-CONTRIB and JDOM-TEST

Error: java.lang.ClassNotFoundException: org.apache.tools.ant.Main

Solution:

JDOM is available as jdom-1.1-tar.gz. If it is un-tarred under /usr it installs in /usr/jdom-1.1. Similarly, jdom-contrib and jdom-test are installed in /usr/jdom-contrib-1.1 and /usr/jdom-test-1.1 respectively. After this if ./build.sh is run in jdom-contrib-1.1 or jdom-test-1.1, Class not found exception for org.apache.tools.ant.Main results. The reason is that the build.sh under jdom-contrib and jdom-test expects a ../jdom/lib, whereas jdom has been installed under ../jdom-1.1. The solution is to link jdom-1.1 to jdom, that is,

cd /usr
ln -s jdom-1.1 jdom