ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Priyapravas <priyapra...@infosys.com>
Subject Re: java task
Date Wed, 05 Nov 2003 09:22:23 GMT
Keith,
  I guess that's a fair answer.

Thanks.

-Priyapravas

On Nov 5, 2003, at 2:31 PM, Keith Hatton wrote:

> Hi Priyapravas,
>
> At a guess this has something to do with Ant's classloaders.
> When you use fork=true, Ant starts a new VM with a straightforward 
> classpath setting.
> When you use the <java> task without forking, some classes may be 
> invisible because of the classloading mechanism (don't ask me about 
> the details :)).
> As a rule, I would say fork=true is good, unless your app is really 
> simple.
>
> Hope this helps
> Keith
>
> -----Original Message-----
> From: Priyapravas [mailto:priyapravas@infosys.com]
> Sent: 05 November 2003 07:43
> To: Ant Users List
> Subject: java task
>
>
> All,
> I tried executing the java task from within ant. The target looked 
> something like this:
>
> <target depends="init" name="execute">
> <java classname="<name_of_the_class_to_execute>">
> <classpath refid="project.class.path"/>
> </java>
> </target>
>
> On executing this target I got the following error:
>
> [java] javax.xml.parsers.FactoryConfigurationError: Provider 
> org.apache.xerces.jaxp.SAXParserFactoryImpl not found
>
> Now, I added the attribute fork="true" to the java task element.
>
> <target depends="init" name="execute">
> <java classname="<name_of_the_class_to_execute>" fork="true">
> <classpath refid="project.class.path"/>
> </java>
> </target>
>
> I was able to execute the java task. Can anyone explain this?
>
> Cheers,
> -Priyapravas
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message