ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Peter Reilly <>
Subject Re: Escapign backslash in java.home
Date Mon, 15 Nov 2004 14:55:45 GMT
What is wrong with the following?
  <target name="h">
    <concat destfile="x.txt">
      java.home is ${java.home}

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


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
>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,
>To unsubscribe, e-mail:
>For additional commands, e-mail:

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

View raw message