ant-user mailing list archives

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

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

[snippet - untested]

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

<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" />
     </exec>
</target>

[snippet - untested]

HTH
Luis

	
-----Original Message-----
From: Guy Davis [mailto:guy.davis@pason.com]
Sent: Tuesday, May 04, 2004 3:18 PM
To: user@ant.apache.org
Subject: Help: using <exec> with appletviewer


Hello,

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}"/>
   ...
</path>

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" />
     </exec>
</target>

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.

Guy

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

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