ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jan.Mate...@rzf.fin-nrw.de
Subject AW: Writing java.home to file
Date Thu, 18 Nov 2004 13:11:47 GMT
<echo file="tmp" message="${java.home}"/>
<replaceregexp file="tmp" match="\\" replace="/" />   <!-- replace="\\\\"
-->
<loadfile name="java.home.win32" file="tmp"/>
<delete file="tmp"/>

Jan

> -----Urspr√ľngliche Nachricht-----
> Von: Thomas Saxtoft [mailto:TS@sondagsavisen.dk]
> Gesendet am: Donnerstag, 18. November 2004 14:08
> An: Ant Users List
> Betreff: RE: Writing java.home to file
> 
> Well, for me it works that way as well. I had not tried before. 
> But my problem persists, and what I left out in my former e-mail was
> that I am using the replaceregexp task.
> So it must be the replaceregexp task that gives me the 
> problem. I do the
> following:
> 
> <target name="createServerXml">
>     <replaceregexp file="${oc4j_home}/config/server.xml"
>     match="&lt;java-compiler [^>]*/>"
>     replace="&lt;java-compiler
> bindir=&quot;${java.home}/bin&quot;extdirs=&quot;${java.home}/
> jre/lib/ex
> t&quot;/>"/>
>   </target>
> 
> So the thing is that I probably have to replace all backslashes with a
> double backslash before using it in the replaceregexp task. 
> But how do I
> do that having the java.home property.
> 
> Thanks in advance,
> 
> Thomas
> 
> ---------------------------------------------------------------------
> 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