ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Adam Murdoch <adammurd...@apache.org>
Subject Re: custom ant task can't find classpath
Date Mon, 08 Apr 2002 23:40:30 GMT

Hi,

It's kinda hard to figure out what's going wrong without seeing your code.  
Using ExecuteJava is pretty straight-forward, though - you should be doing 
something like this in your task:

public void execute()
{
    Path classpath = new Path( getProject() );
    classpath.setLocation( helperJarFile );

    Commandline cmdline = new Commandline();
    cmdline.setExecutable( "Help" );
    cmdline.createArgument().setValue( param1 );

    ExecuteJava exe = new ExecuteJava();
    exe.setCommandline( cmdline );
    exe.setClasspath( classpath );

    exe.execute( getProject() );
}

On Tue, 9 Apr 2002 09:15, tek1 wrote:
> ExecuteJava
>
>
> thanks...
>
> At 17:22 02/04/07 +1000, you wrote:
> >On Sat, 6 Apr 2002 22:48, tek1 wrote:
> > > my custom task is calling the Help.class in the helper.jar.
> >
> >How does your task call the Help class?  Reflection?  ExecuteJava? 
> > Execute? Runtime.exec()?
> >

-- 
Adam

--
To unsubscribe, e-mail:   <mailto:ant-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-user-help@jakarta.apache.org>


Mime
View raw message