ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rebhan, Gilbert" <>
Subject RE: possible to open an alert window?
Date Mon, 29 Oct 2007 09:29:49 GMT

Hi, Peter

-----Original Message-----
From: Peter Reilly [] 
Sent: Friday, October 26, 2007 11:32 AM
To: Ant Users List
Subject: Re: possible to open an alert window?


<project name="$1" default="build">
  <target name="run">
    <script language="beanshell">
      import javax.swing.*;
      new Thread() {
        public void run() {
              null, "A long and boring message",
              "Danger Danger", JOptionPane.ERROR_MESSAGE);

    <..... the rest of the build ...>



that doesn't work for me with
Ant 1.6.5, beanshell 2.0b4, bsf 2.3.0_rc1

The build runs through but no JOptionPane gets

The snippet with the class Waiter { } open a JOptionPane
but is just blocking the build, as it does without the whole thread

Sorry i don't get the point, maybe it doesn't work here
because of my (old) version of Ant and/or Bsf ?!?

You' ve tried it with Ant 1.6.5  also ?

To prevent from blocking the build i would use the antcontrib
<limit> task or do it with a timeout like that =

<property name="waitfor" value="20"/>

<script language="ruby">
 require 'timeout'
 include Java
   Timeout.timeout($waitfor.to_i) {
     nil, "A long and boring message",
     "Danger Danger", javax.swing.JOptionPane::ERROR_MESSAGE)
 rescue Timeout::Error
   puts "JOptionPane closed due to inactivity after waiting #{$waitfor}
seconds !!"

Regards, Gilbert

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message