This week's book giveaway is in the Testing forum. We're giving away four copies of Practical Unit Testing with TestNG and Mockito and have Tomek Kaczanowski on-line! See this thread for details.
A novice at using Ant, I am attempting to use the "ant" command, and instead am getting a list of java options one would get when using the "java" command with no options. In other words, when I enter "ant" and return, the result is the same as if I enter "java" and return. Any idea what might be causing this apparent mixup between ant and java? I have tried quite a few different things, and am stumped. I even moved the build.xml file etc into the apache\bin directory, and am getting the same result. Your help is much appreciated.
Ant is a Java application. Its is run by calling ant.bat (on Windows anyway). If you open up ant.bat you'll see the java command that is actually being called. There are a bunch of options and variables which should be set. I would presume that java is complaining becuase one of these options isn't set (unless you have editied ant.bat?). The obvious one which the documentation tells you to set is ANT_HOME. Make sure this is set.
Paul, thanks for your response. Soon after posting my message yesterday, I discovered that ant.bat was inserting a "\" in one of the filepaths that I was not expecting; this conflicted with one of my filepaths in an environment variable I created, so the filepath ant used had a "\\".