amri (1) [Avatar] Offline
Hi all,
I'm new here, I maked a file build.xml like this

<?xml version="1.0" encoding="UTF-8"?>
<project name="helloworld" default="compile" basedir=".">
Build file for the Hello World application.

and I saved it in c:/

and I went to command prompt, and did like this

c:/ ant build.xml

but i get this error

Tareget "build.xml" does not exist in the project "helloworld".
Total time : 0 seconds

can anyone help me please

javaburre (1) [Avatar] Offline
Re: I need help
ant by default searches for a build.xml file in your current directory. So no need to mention it:

c:/ ant

This will launch ant using the build.xml file. Because you set a default target named 'compile' it will launch this one. Your build.xml file needs a 'compile' target:
<target name="compile">
<!-- see javac for example -->

If you want to use a build file other the build.xml you have to use following syntax:

c:/ ant -f other.xml

(note the -f )

To launch a target 'unittest' defined in build.xml:

c:/ ant unittest

hope it helped.