title: How to set manifest tag for jar file in build.xml?
body: <p>I want to make a build.xml for ant build.</p>
  
  <p>I have the directory structure like this</p>
  
  <pre><code>practice
  |____src
  |    |_____Func1.java
  |    |_____Func2.java
  |    |_____MainClass.java
  |
  |
  |____build
       |_____temp
       |_____hello.jar
  </code></pre>
  
  <p>This <code>build directory</code> is not present initially. I want to make a <code>ant build</code> which compiles from <code>src</code> and put <code>.class</code> files in <code>build/temp</code>. Then make <code>.jar</code> from the <code>.class</code> files in <code>build directory</code>, and finally <code>delete</code> the <code>temp directory</code>.</p>
  
  <p>I am able to do these, but the jar file needs <code>Main-Class</code>.</p>
  
  <p>The <code>.jar</code> creation part is like following</p>
  
  <pre><code>&lt;property name="build.dir" value="build"&gt;&lt;/property&gt;
  &lt;property name="temp.dir" value="${build.dir}/temp"&gt;&lt;/property&gt;
  
  &lt;jar destfile="${build.dir}/${jar.name}.jar" basedir="${temp.dir}"&gt;
      &lt;manifest&gt;
          &lt;attribute name="Main-Class" value="MainClass"/&gt;
          &lt;attribute name="Class-path" value=""/&gt;
      &lt;/manifest&gt;
  &lt;/jar&gt;
  </code></pre>
  
  <p>I'm not getting what should be the <code>Class-path</code>, as all <code>.class</code> will be deleted from <code>temp directory</code>. I also tried giving the value as the <code>.jar</code> file itself.</p>
  
  <p>I'm new to ant build.  So maybe I'm missing something silly.</p>