Hi,

I have a build file, and in that build file I'm setting up my classpath and assigning it. However, when I try to run my compiled code, I get a NoClassDefFoundError: service/ImageProcessor.

When I run my code and set the classpath manually using the -cp argument to the java command, the program executes fine. Here is the command I use that works:

java -cp /u/dgresh/Ice-3.1.0/lib/Ice.jar:.:$CATALINA_HOME/webapps/kdb/WEB-INF/classes vigra.ice.LOTFClient

*Note: service/ImageProcessor's full path is: $CATALINA_HOME/webapps/kdb/WEB-INF/classes/service/ImageProcessor.

In my buildfile, here is the code I use to set up my classpath:

   <!-- Define the Java classpath -->
   <path id="classpath">
       <pathelement location="." />
<pathelement location="${CATALINA_HOME}/webapps/kdb/WEB-INF/classes" />
       <pathelement location="/u/dgresh/Ice-3.1.0/lib/Ice.jar" />
   </path>

I know $CATALINA_HOME is correct, as I use it with the ant reload argument to reload my web app on Tomcat. Here is how I compile the code:

   <!-- Compile the Java code -->
   <target name="compile" depends="init">
<javac srcdir="${src}" destdir="${build}/LOTFVigra" source="1.4" target="1.4">
           <classpath refid="classpath" />
       </javac>
   </target>

As you can see, the two classpaths are identical. I have no idea what is causing this problem.

Does anyone have any advice?

Thanks,
Dan

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to