ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Joshua Slider" <jsli...@MusicNet.com>
Subject RE: using ANT to run a java program that runs from the command line
Date Fri, 23 Mar 2007 17:37:46 GMT
This would be one way to do it, without the fork I ended up getting some
strange errors from ANT regarding an inability to access public static
method main, the documentation mentions if you run into anything wonky
forking the process.

http://ant.apache.org/manual/index.html

Check the Java task.


<project name="demo" default="demo" basedir="."> 
    <target name="demo">
        <java classname="HelloWorld"
              fork="true">
            <arg value="-h"/>
            <classpath>
                <pathelement location="c:/demo"/>
            </classpath>    
        </java>
    </target>
</project>

Joshua Slider
Software Development Engineer
MusicNet
(206) 269-6045 Direct
jslider@musicnet.com 
-----Original Message-----
From: Chris Johnson [mailto:johnsoc2@allegheny.edu] 
Sent: Friday, March 23, 2007 10:03 AM
To: user@ant.apache.org
Subject: using ANT to run a java program that runs from the command line

I have been looking through the documentation on ANT and am a little  
confused about how to run a java program using ANT and have it be the  
same as if I'd run it from the command line.  Another possible  
solution would be to run the program on the ant build of JUnit on the  
command line.  Is this second solution possible, and if not does  
anyone have any suggestions that may make the first solution easier  
to understand?  Thanks in advance.

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


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


Mime
View raw message