Hi Montsie,
Could ye maybe try putting the classes;lib/bar.jar in enclosed
escaped quotes? Maybe the ; is getting parsed out at some stage?
HTH,
Mark.
i.e.
<target name="foo">
<exec executable="foo.bat">
<arg line="-cp \"classes;lib/bar.jar\""/>
</exec>
</target>
-----Original Message-----
From: Michael Kaegi [mailto:kam@brainware.ch]
Sent: 04 April 2003 17:17
To: user@ant.apache.org
Subject: Strange problem with <arg> tag
Hi
I try to execute a batch file("foo.bat") from an Ant build script. The
batch file executes a java application.
The java application requires some additional libraries. The libraries
are loaded over the java
classpath option. Now I want specify the classpath using the Ant <arg>
tag.
E.g..
<target name="foo">
<exec executable="foo.bat">
<arg line="-cp classes;lib/bar.jar"/>
</exec>
</target>
foo.bat:
echo %1 %2 %3
rem java -cp 2% foo.Foo
The problem is that something goes wrong with the classpath.
In detail the semicolon between the lib files is missing.
E.g..
java -cp classes lib/bar.jar foo.Foo
in place of
java -cp classes;lib/bar.jar foo.Foo
Any suggestions or pointers would be greatly appreciated.
Thanks in advance. ,
montsie
|