Troubleshooting CLASSPATH and environment variables setup

If you see a "can't find resource\messages.xml" error message when you try to build using Ant, remove other items from your CLASSPATH variable one-by-one until you find the culprit. Your environment variable setup can be the source of the problem because sometimes other applications or .jar files can override CLASSPATH settings. To assist in troubleshooting the CLASSPATH, create a simple run.bat file that contains only SAXON, Ant, and the DITA Open Toolkit dost.jar paths. For example:

set CLASSPATH=C:\saxon\saxon.jar;C:\ant\apache-ant-1.6.5;\lib\dost.jar;.

ant demo.faq.

Note: The dot at the end of the set CLASSPATH command ensures that your current directory is included in the CLASSPATH. By requesting a small build like "ant demo.faq" rather than "ant all" you can save time if the build is successful.

By setting the CLASSPATH just for one session and running the batch file within the ditaot directory, you can pinpoint if the problem is your CLASSPATH. Once you get a BUILD SUCCESSFUL message, add in CLASSPATH entries one by one until you find the entry that conflicts with DITA Open Toolkit.