Hello,
I have this problem with Ant:
when I use my build.xml, my files get compiled and
are placed in the right directory, but the target "run" doesn't work.
In this target, the built in task "java" is used. Could it be that
there's something wrong with this task?
<target name="init">
<property name="src" value="src" />
<property name="build" value="build" />
<property name="class_path" value="build" />
</target>
...
<target name="run" depends="compile">
<java classname="Test" classpath="${class_path}" args="test 1 2"/>
</target>
The directory structure is:
..
|
----- testAnt
|
---------- build (created by build.xml - will contain all the
class file)
---------- src
---------- build.xml
The basedir is "testAnt", the properties "build" and "class_path" are set to
"build".
No packages are used in the source files.
When I type "java -cp build Test" on the command line, no problems arise and
my program is
shown.
What am I doing wrong?
Kind regards,
JAN SMETS
--
Best regards,
vriendelijke groeten,
Frans Cornelissen tel 32-14-60-3327
Janssen Research Foundation fax 32-14-605788
Turnhoutseweg 30 e-mail fcorneli@janbe.jnj.com
B2340 Beerse, Belgium
|