<project name="SoundOfFiles" >

	<property name="src.dir"  value="src/main/java" />
	<property name="classes.dir"  value="classes" />
	<property name="main-class"  value="sounds.SoundOfFiles" />
	
	<target
		name="compile"
		description="Compile source code." >
		<mkdir
			dir="${classes.dir}" />
		<javac
			includeantruntime="false"
			srcdir="${src.dir}"
			destdir="${classes.dir}"
			debug="on" />
	</target>

	<target
		name="jar"
		depends="compile"
		description="Create jar." >
		<jar
			destfile="${ant.project.name}.jar"
			basedir="${classes.dir}" >
			<manifest>
				<attribute
					name="Main-Class"
					value="${main-class}" />
			</manifest>
		</jar>
	</target>
	
	<target
		name="clean"
		description="Clean build." >
		<delete
			dir="${classes.dir}" />
	</target>

</project>
<project name="SoundOfFiles" >

	<property name="src.dir"  value="src/main/java" />
	<property name="classes.dir"  value="classes" />
	<property name="jar"  value="${ant.project.name}.jar" />
	<property name="main-class"  value="sounds.SoundOfFiles" />
	
	<target
		name="compile"
		description="Compile source code." >
		<mkdir
			dir="${classes.dir}" />
		<javac
			includeantruntime="false"
			srcdir="${src.dir}"
			destdir="${classes.dir}"
			debug="on" />
	</target>

	<target
		name="jar"
		depends="compile"
		description="Create jar." >
		<jar
			destfile="${jar}"
			basedir="${classes.dir}" >
			<manifest>
				<attribute
					name="Main-Class"
					value="${main-class}" />
			</manifest>
		</jar>
	</target>

	<target
		name="run"
		depends="jar"
		description="Run the program." >
		<java
			fork="true"
			jar="${jar}" />
	</target>
	
	<target
		name="clean"
		description="Clean build." >
		<delete
			dir="${classes.dir}" />
	</target>

</project>
Make the jar file name a property and added a new target - run.
Make the jar file name a property and added a new target - run.
