it's me again. I've been trying to create java project into a runnable jar using ant script. This is my build.xml
<project name="simple-app" basedir="." default="main">
<property name="src.dir" value="src" />
<property name="build.dir" value="build" />
<property name="classes.dir" value="${build.dir}/classes" />
<property name="jar.dir" value="${build.dir}/jar" />
<property name="lib.dir" value="lib" />
<property name="main-class" value="app.App" />
<path id="classpath">
<fileset dir="${lib.dir}">
<include name="*.jar" />
</fileset>
<dirset dir="${build.dir}">
<include name="classes"/>
</dirset>
</path>
<target name="clean">
<delete dir="${build.dir}" />
</target>
<target name="compile">
<mkdir dir="${classes.dir}"/>
<javac source="1.7" target="1.7" includeantruntime="false" srcdir="${src.dir}" destdir="${classes.dir}" classpathref="classpath" />
</target>
<target name="jar" depends="compile">
<mkdir dir="${jar.dir}" />
<jar destfile="${jar.dir}/${ant.project.name}.jar" basedir="${classes.dir}" includes="*.class">
<manifest>
<attribute name="Main-Class" value="${main-class}" />
</manifest>
</jar>
</target>
<target name="run" depends="jar">
<java classname="${main-class}">
<classpath>
<path refid="classpath" />
<path location="${jar.dir}/${ant.project.name}.jar" />
</classpath>
</java>
</target>
<target name="main" depends="clean,run"/>
</project>
All goes well, but when it gets to "run" it gets stuck. Terminal says run: and nothing happens. Waited for 30 minutes, nothing. I tried many other options I found around the internet but those resulted either in the same lag, or threw ClassNotFoundException.
I seriously don't know what, to do. When I make the file with Eclipse, all works fine. Anyone can help me? It's propably something totally stupid, but I just don't see it. Thank you very much.