ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ognjen Blagojevic <ogn...@etf.bg.ac.yu>
Subject Re: Java task, classpath problem
Date Tue, 28 Aug 2007 08:22:27 GMT
Hi Peter,

Thanks for your answer. And sorry for late reply, I was on vacation.

Peter Reilly wrote:
> The <java> task does strange things with the classloader.
> My advice would be to use fork="yes" unless there
> is a reason not to.

Yes, I see. fork="yes" solved the problem.


> As regards the exception you are seeing, this is as far
> as I can see behaviour as designed.

Then it is strangely designed. See below.


> If one gives a classpath to the <java> task, the classname
> *must* be in the classpath, for example:
> 
> <path id="empty"/>
> <java classname="java.lang.Object" classpathref="empty"/>

This returns "Could not find java.lang.Object.", and adding fork="yes" 
returns (expected) "NoSuchMethodError".

In other words, using fork="yes" implies that rt.jar is in classpath, 
otherwise (fork="no"), rt.jar is not in the classpath. Right?


Regards,
Ognjen

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


Mime
View raw message