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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to