Thanks Antonie.

I created a wrapper class.

public class TestSingletonInitializer
{
   public static void main(String[] args)
   {
       TestSingleton.initialize();
   }
}

This still doesnt run very well. But when I use my initialize method inside
of the junit tests. ex.

<junit>
TestSingleton.initialize()
..
run tests
..
TestSingleton.shutdown()
</junit>

It works fine. Any clues why the initialize method runs succesffully inside
the junit taask but not a seperate java task?




On 6/8/06, Antoine Levy-Lambert <[EMAIL PROTECTED]> wrote:

Hello,

you need to write a main method which calls the method you want to run.
May be add a main method to util.runtime.TestSingleton.

The only method which can be invoked by <java/> is static void main
(String [] args).

Regards,

Antoine
> -------- Original-Nachricht --------
> Datum: Thu, 8 Jun 2006 12:54:04 -0400
> Von: 1800 tbsfunny <[EMAIL PROTECTED]>
> An: user@ant.apache.org
> Betreff: Methods inside Java ant task
>
> Hi Ant gurus,
>
> I am trying to write an Ant task that looks something like that -
>
> <target name="startcss" description="starting CSS" depends="setup">
>         <java classname="util.runtime.TestSingleton.initialize()"
> fork="no"
> failonerror="no">
>             <classpath refid="testrunning.classpath"/>
>         </java>
>     </target>
>
> This fails on me because we cannot run methods directly. Any
suggesstions?

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to