ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From v...@trilogy.com
Subject RE: Weird Swing error when using Ant
Date Fri, 07 Sep 2001 22:15:16 GMT
Sorry, I think I should have paid more attention to your target 
definition. Since you are using fork=true any kind of security manager in 
ant's VM will not matter for the spawned VM.
Disregard my previous post. The sources for 1.4 don't seem to be 
establishing a security manager anyway.

To be honest, there is not much that can prevent a System.exit() from 
exiting the VM and so I cannot explain the behavior you are seeing. I know 
that Swing apps will not to exit without an explicit System.exit() because 
of the non-deamon threads spawned by AWT but if the call definitely occurs 
in your case, something else must be responsible for the hanging behavior.

Vlad.


Please respond to ant-user@jakarta.apache.org
To:     <ant-user@jakarta.apache.org>
cc: 

Subject:        RE: Weird Swing error when using Ant


In which case I'd get a SecurityException!

The ant manual is very specific that for the java task you should set
fork=true otherwise System.exit() will kill ant as well as your app.

I have other apps that call System.exit() and these work fine from ant -
it's just this one,

Kevin Jones
Developmentor
www.develop.com

> -----Original Message-----
> From: vlad@trilogy.com [mailto:vlad@trilogy.com]
> Sent: 07 September 2001 19:49
> To: ant-user@jakarta.apache.org
> Subject: Re: Weird Swing error when using Ant
>
>
> Very doable in Java. Must be that Ant uses a custom security manager 
that
> overrides checkExit().
>
> Vlad.
>
>
>
> Please respond to ant-user@jakarta.apache.org
> To:     "Ant-User" <ant-user@jakarta.apache.org>
> cc:
>
> Subject:        Weird Swing error when using Ant
>
>
> It must be me but...
>
> I have a Swing app that calls System.exit(0) when the main window is
> closed.
> When I run the app from the command line it closes fine, however when I
> run
> the app from with Ant it doesn't exit the VM.
>
> My target looks like this
>
>   <target depends="build" name="RunUI">
>    <java classname="com.develop.kevinj.http.ui.HttpProxyUI"
>               classpathref="project.class.path" failonerror="true"
>               fork="true">
>         <arg line="8888 8080 localhost"/>
>     </java>
>   </target>
>
> I've checked the archives but have seen nothing on this, (this is under
> 1.3
> and 1.4)
>
> Kevin Jones
> Developmentor
> www.develop.com
>
>
>
>





Mime
View raw message