How To Solve Apache Ant java Task Execution Errors

By Angsuman Chakraborty, Gaea News Network
Wednesday, July 26, 2006

I have seen myriad errors when executing java task. For example I have seen: javax.xml.parsers.FactoryConfigurationError?: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl? not found when executing the java task in jdk1.5.0

The problems with debugging the errors is that the commandline used by java task is not visible, even in verbose mode.

The solution to both the problems is to add the attribute fork=”true” to java task. This not only solves strange java task related problems but also provides detailed commandline in verbose mode. Highly recommended.

YOUR VIEW POINT
NAME : (REQUIRED)
MAIL : (REQUIRED)
will not be displayed
WEBSITE : (OPTIONAL)
YOUR
COMMENT :