ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (GNF, Contractor)" <>
Subject RE: Help: using <exec> with appletviewer
Date Tue, 04 May 2004 20:24:05 GMT

	Why don't you use <pathconvert> task and pass the argument with <arg line="${pathconvert.prop}">.

[snippet - untested]

<path id="my-classpath">
    <fileset dir="${app}/lib" >
        <include name="**/*.jar"/>
        <include name="**/*.zip"/>

<target name="runApplet">
     <pathconvert property="classpath.ref" refid="my-classpath" dirsep="/" pathsep=" "/>
     <exec dir="." executable="appletviewer">
       <arg value="-J-classpath" />
       <arg line="classpath.ref"/>
       <arg value="run.html" />

[snippet - untested]


-----Original Message-----
From: Guy Davis []
Sent: Tuesday, May 04, 2004 3:18 PM
Subject: Help: using <exec> with appletviewer


I'm trying to exec 'appletviewer' from Ant, however I'm not able to get 
Ant to pass the command line arguments correctly.

What I want on the command line is this:

appletviewer -J-classpath -Jbuild_dir:../../some/libs/lib1.jar run.html

I've tried this from my Bash shell and the viewer launches correctly. 
The reason I want Ant to exec this is that it already has a reference 
for the classpath:

<path id="classpath.ref">
   <pathelement location="${build}"/>

I'd like to have this classpath expand into the above command when the 
target is run.

I've tried a number of combinations, but the closest I could get was:

<target name="runApplet">
     <exec dir="." executable="appletviewer">
       <arg value="-J-classpath" />
       <arg pathref="classpath.ref"/>
       <arg value="run.html" />

Unfortunately, this leaves out the '-J' just before the class path 
expansion.  Everything else I try doesn't expand the class path.

I'd appreciate any help the list can provide.  I looked for a 
appletviewer task but couldn't find one.  Thanks in advance.


To unsubscribe, e-mail:
For additional commands, e-mail:

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message