I am useing eclipse and ant and trying to make a jar file. I have used some external jar files. I have managed to add external jar files to my jar. But Still I have a problem. In my project all libraries in lib folder. But when I put them into jar file. They are in the root folder.Classpath has changed and It couldn't find the class path.
Is there any body knows how to define a new class path for external libraries with ANT. or How can I put my libraries into a lib folder in jar ?? I think both of them would solve my problem.
thanks in advance.
My code is like that, I think it requires a little modification
<target name="jar">
<mkdir dir="build/jar"/>
<jar destfile="build/jar/Deneme.jar" basedir="build/classes" >
<manifest>
<attribute name="Main-Class" value="${main-class}"/>
</manifest>
<fileset dir="${lib.dir}" includes="**/*.jar"/>
</jar>
</target>