title: "no main manifest attribute"
body: <p>Hi I'm working on a project where i'm told to create dist ant target which creates JAR file and jrun target which depends on dist target ant should run dist created jar file. While ant jrun i get the folowing error : <code>jrun
                        [java]: no main manifest attribute in *\build\jar\navus.jar</code></p>
  
  <pre><code> &lt;?xml version="1.0" encoding="UTF-8"?&gt;
  
  &lt;project name="POS" default="build" basedir="."&gt;
  
  &lt;!-- Project properties--&gt;
  
  &lt;property name="src.dir" value="${basedir}/src"/&gt;
  &lt;property name="build.dir" value="${basedir}/build"/&gt;
  &lt;property name="classes.dir" value="${build.dir}/classes"/&gt;
  &lt;property name="lib.dir" value="${basedir}/lib"/&gt;
  &lt;property name="jar.dir" value="${build.dir}/jar"/&gt;
  &lt;property name="main.class" value="ee.ut.math.tvt.navus.Intro"/&gt;
  
  &lt;!-- Different classpaths form compiling and running--&gt;
  
  &lt;path id="compile.classpath"&gt;
          &lt;fileset dir="${lib.dir}"&gt;
              &lt;include name="**/*.jar"/&gt;
          &lt;/fileset&gt;
  &lt;/path&gt;
  
      &lt;path id="run.classpath"&gt;
              &lt;pathelement location="${classes.dir}"/&gt;
              &lt;path refid="compile.classpath"/&gt;
          &lt;/path&gt;
  
  
  &lt;!-- Clean existing build--&gt;
  &lt;target name="clean"&gt;
      &lt;delete dir="${build.dir}" /&gt;
  
  
  &lt;/target&gt;
  
  
  
  &lt;!-- Builds Java code--&gt;
  
  &lt;target name="build" depends="clean"&gt;
      &lt;mkdir dir="${build.dir}"/&gt;
      &lt;mkdir dir="${classes.dir}"/&gt;
      &lt;copy file="${src.dir}/log4j.properties" todir="${classes.dir}" overwrite="true" /&gt;
  
      &lt;javac 
          srcdir="${src.dir}" 
          destdir="${classes.dir}"&gt;
          &lt;classpath refid="compile.classpath"/&gt;
      &lt;/javac&gt;
  &lt;/target&gt;
  
  &lt;!-- Creates jar file--&gt;
  
  &lt;target name="dist" depends="build"&gt; 
      &lt;mkdir dir="${jar.dir}"/&gt;
      &lt;propertyfile file="version.properties"&gt;
          &lt;entry key="build.revision.number" type="int" default="0" operation="+"/&gt;
      &lt;/propertyfile&gt;
  
      &lt;jar jarfile="${build.dir}/jar/navus.jar"
           basedir="${build.dir}/classes"&gt;
          &lt;manifest&gt;
              &lt;attribute name="mainClass" value="${main.class}"/&gt;         
          &lt;/manifest&gt;
          &lt;fileset dir="${basedir}" includes="${src.dir}"/&gt;
  
          &lt;/jar&gt;
  &lt;/target&gt; 
  
  &lt;!-- Executes application via class Intro--&gt;
  
  
      &lt;target name="run"  depends="build"
      description="runs introUI via Intro" &gt;
        &lt;java classname="${main.class}"
  
          classpathref="run.classpath"
          fork="yes"&gt;
  
        &lt;/java&gt;
      &lt;/target&gt;
  
  
  &lt;!-- Runs application using JAR file--&gt;
  
  &lt;target name="jrun" depends="dist"
      description=" Run JAR file"&gt;
      &lt;java jar="${jar.dir}/navus.jar" 
      fork="yes"/&gt;
  
  &lt;/target&gt;
  
  
  &lt;/project&gt;
  </code></pre>