title: How to run main() Method with Ant Script?
body: <p>I just want to run the <code>main()</code> - Method of a java class by double clicking my
  the ant task in eclipse ant - view. My Problem is, I don't know how to write the ant file exactly. My ant file should be <code>analyzeDatabase.xml</code>.</p>
  
  <p>I tried something like this, but always fails:</p>
  
  <pre><code>&lt;?xml version="1.0" ?&gt;
  &lt;project name="DBAnalyzer" default="run" basedir="."&gt;
      &lt;target name="run" description="runs dbanalyzer"&gt;
          &lt;java classname="DBAnalyzer"&gt;
              &lt;arg value="-h"/&gt;
          &lt;/java&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p><img src="https://i.stack.imgur.com/2rngt.png" alt="enter image description here"></p>