What is wrong with the following?
 <target name="h">
   <concat destfile="x.txt">
     java.home is ${java.home}
   </concat>
 </target>

If you wanted to replace \ with \\, you could use a scriptfilter:
   <concat destfile="x.txt">
     <filterchain>
       <scriptfilter language="beanshell">
         self.setToken(self.getToken().replace("\\", "\\\\"));
       </scriptfilter>
     </filterchain>
     \a\b\c
   </concat>

Peter

Thomas Saxtoft wrote:

On a Windows XP I have to write the java.home property to a file, but
doing that the '\' disappears. I suspect that it needs to be escaped
like '\\', but the value of java.home is the one that contains the
backslash.
How do I write it to the file?

The next thing is, how do I make it general so that it also works on a
Linux machine?

Thanks in advance,

Thomas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]







---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to