MathGroup Archive 2006

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: Re: [TS 22578]--Re:does anyone have an ant task for mathematica?

At 02:26 AM 9/9/2006, Chris Chiasson wrote:
>I realize it was a long shot. Thanks for the reply.
>On Fri, 8 Sep 2006 13:00:01 UT, mathgroup <mathgroup at> wrote:
> >  -- Wolfram Research Technical Support --
> >
> > This is a response to your email.
> > The reply to your question can be found at the bottom of this message.
> > Our classification number for this message is: [TS 22578]
> > Please give this number in any future correspondence
> > related to this question. If you leave this number in
> > the Subject: [mg69382] [mg69359] header in the form [TS 22578], it will
> > automatically be reassigned to the original technician.
> >
> > From: "Chris Chiasson" <chris at>
To: mathgroup at
>To: mathgroup at
> > Date: Sun, 3 Sep 2006 05:40:34 -0500
> > Subject: [mg69382] [mg69359] does anyone have an ant task for mathematica?
> > To: mathgroup <mathgroup at>,"support at" 
> <support at>
> >
> > Assumedly, it would be able to start Mathematica, execute some .m
> > files, and then return control back to ant.


In fact, there already _is_ an Ant task for this in J/Link. It was added in 
J/Link 3.1, so anyone with Mathematica 5.2 or later already has it, and 
anyone else can download the latest J/Link version from

We use Ant for many things within WRI, and its use is growing, so it was 
essential to have a task that could call Mathematica. We snuck the class 
into J/Link 3.1 without documenting it, as it was experimental at the time, 
and we wanted to make it available to internal users. It has since had some 
features added to it, and it will be documented as a first-class component 
of J/Link in the next release.

You can see the source code for the class in 
AddOns/JLink/Source/Java/com/wolfram/jlink/util/ You 
will have to look at that file, because it contains the documentation on 
how to use the task. In addition to executing arbitrary Mathematica code, 
you can also interact with Ant, such as calling tasks, getting/setting 
properties, etc. Here is a simple example:

       <mathematica exe="c:/program files/wolfram 
            result = CallTestFunction[];
               AntFail["Mathematica test function failed"]

Todd Gayley
Wolfram Research

  • Prev by Date: some integrals containing BesselJ
  • Next by Date: RE: Re: [TS 22578]--Re:does anyone have an ant task for mathematica?
  • Previous by thread: Re: Re: [TS 22578]--Re:does anyone have an ant task for mathematica?
  • Next by thread: Re: Re: Re: [TS 22578]--Re:does anyone have an ant task for mathematica?