1 Reply Latest reply on Dec 3, 2007 3:06 AM by 807600

    ant - package junit.framework does not exist

      hello everybody,

      I am getting this error : package junit.framework does not exist, when compiling with ant. What I have to do to resolve this error? I am a beginer in using ant

      thanks for your consideration
        • 1. Re: ant - package junit.framework does not exist
          junit.framework is a package in junit.jar. You will need this in the path that you pass to your compile step, you need something like this:
          <path id="class.path">
                    <pathelement location="${dest}" />
                    <fileset dir="${lib}" includes="*.jar" />
                    <pathelement location="${extras}/junit/junit.jar" />
          and then you use that in your compile:
               <target name="compile" depends="init">
                    <javac classpathref="class.path" destdir="${dest}/classes" srcdir="${src}"  debug="true" />
          of course if you want to run the tests from ant you may need to include the jar file for optional ant junit task in ant's library if its not already there.