  | |  | Classpath problem | Classpath problem 2004-01-10 - By Dominique Devienne
Back > From: Christoph Schwitter [mailto:christophschwitter@(protected)]
> <path id= "project.class.path " >
> <pathelement path= "${java.class.path} "/ >
^ you don 't need to do that
It 's controlled by includeAntRuntime
> <fileset dir= "${lib_chsDir} " >
> <include name= "**/*.jar "/ >
> </fileset >
> <fileset dir= "${lib_extDir} " >
> <include name= "**/*.jar "/ >
> </fileset >
> </path >
>
>
> <target name= "compile " depends= "init "
> description= "Compile java source files " >
> <echo >Compiling java source files in ${srcDir} to
>
> {classDir} </echo >
> <mkdir dir= "${classDir} "/ >
> <javac srcdir= "${srcDir} "
> destdir= "${classDir} "
^ Javac implicitly uses the destdir
in the classpath
> includes= "**/*.java " >
> <classpath refid= "project.class.path "/ >
> </javac >
> </target >
>
>
> <target name= "runonly " depends= "init "
> description= "Run the program from the jar file " >
> <java jar= "${projectName}.jar "
> fork= "true "
> failonerror= "true " >
> <classpath refid= "project.class.path "/ >
whereas Java doesn 't.
Add ${classDir} to your classpath
> </java >
> </target >
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ------
To unsubscribe, e-mail: user-unsubscribe@(protected)
For additional commands, e-mail: user-help@(protected)
|
|
 |