You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by bu...@apache.org on 2003/01/25 12:10:13 UTC

DO NOT REPLY [Bug 3158] - "java" task has got problems with loading classes on Java1.4

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3158>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3158

"java" task has got problems with loading classes on Java1.4

conor@cortexebusiness.com.au changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|REOPENED                    |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From conor@cortexebusiness.com.au  2003-01-25 11:10 -------
Summary
========
Andreas - your example works on Ant 1.6 alpha

Jason - your example fails and will always fail. By asking for the System
classloader, you are getting Ant's system loader. The <java> task with fork="no"
provides an imperfect approximation of running your class in its own VM. Things
like fiddling with System.out and using System resources such as the System
Loader will generally cause problems. You need to either change your loading
approach to something like

URL url = Test2.class.getClassLoader().getResource( "Test2.class" );

which will work when not forked or accept the fact that some things need to be
forked.

Christopher - your bug is fascinating - the first four iterations work - the 5th
fails. Anyway, under Ant 1.6Alpha, this works correctly.

Steve - your example also displays the weird behaviour of Christoper's example
and it too works under Ant 1.6alpha

or, in other works we have FIXED, WONTFIX, FIXED, FIXED. 

I'm going to close as FIXED.

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>