This is the target which prepares the dist/bin and dist/demo/lib/launcher directories
(the entire ant script is included into the example sources) :

<targetname="dist.demo.bin"><!-- create the lib/launcher directory with the lib files provided by the commons launcher --><copytodir="dist/demo/lib/launcher"><filesetdir="import/commons/launcher/lib"><includename="*.jar"/></fileset></copy><!-- copy the needed files into the bin directory --><copytodir="dist/demo/bin"flatten="true"><!-- from the commons launcher --><filesetdir="import/commons/launcher/bin"><includename="LauncherBootstrap.class"/><includename="commons-launcher.jar"/></fileset><!-- from the application sources --><filesetdir="source/org/kolaka/jdf/demo"><includename="jdf2-demo.sh"/><includename="launcher.xml"/></fileset></copy><!-- make executable the shell scripts --><chmodperm="+x"><filesetdir="dist/demo/bin"><includename="*.sh"/></fileset></chmod><!-- create a property with the path to all 'lib/launcher' files --><pathconvertproperty="dist.demo.bin.ant.class.path"pathSep=":"><path><filesetdir="dist/demo/lib/launcher"><includename="*.jar"/></fileset></path><mapfrom="${basedir}/dist/demo"to=".."/></pathconvert><!-- creates the 'launcher.properties' with this path --><propertyfilefile="dist/demo/bin/launcher.properties"><entrykey="ant.class.path"value="${dist.demo.bin.ant.class.path}"/></propertyfile></target>