java - Ant Build Failed in Eclipse -
java - Ant Build Failed in Eclipse -
i building jar file of project using ant after searching in google found how do referred this ink. below build.xml file
<?xml version="1.0" ?> <project name="exceldata" default="compress"> <target name="init"> <mkdir dir="build/classes" /> <mkdir dir="dist" /> </target> <target name="compile" depends="init"> <javac srcdir="src" destdir="build/classes" /> </target> <target name="compress" depends="compile"> <jar destfile="dist/exceldata.jar" basedir="build/classes" /> </target> <target name="execute" depends="compile"> <java classname="com.spt.excel.data.exceldata" classpath="build/classes" /> </target> <target name="clean"> <delete dir="build" /> <delete dir="dist" /> </target> </project>
but problem ant building failing. getting errors as
d:\eclipse\workspace\exceldata\src\com\spt\excel\data\exceldata.java:24: error: bundle org.slf4j not exist`
and referred this link set tools.jar.
can tell me going wrong. give thanks in advance.
you have no include libraries ant file, mean classpath, add together libs eclipse project contains ant file , work, , please read original tutorial this one
like
<javac srcdir="${src.dir}" destdir="${classes.dir}"> <classpath> <pathelement location="${lib.dir}/lib1.jar"/> <pathelement location="${lib.dir}/lib2.jar"/> </classpath> </javac>
for libs
<path id="mylibs"> <fileset dir="${lib.dir}" includes="**/*.jar"/> </path> <javac srcdir="${src.dir}" destdir="${build.dir}" classpathref="mylibs" debug="on"/>
add properties lib.dir
<property name="lib.dir" location="{here path libraries}"/>
java ant
Comments
Post a Comment