ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Conelly, Luis (GE Energy, Non GE, GENE)" <Luis1.Cone...@ge.com>
Subject RE: Escapign backslash in java.home
Date Mon, 15 Nov 2004 14:24:07 GMT
why don't you use forward-slashes instead backslashes?

It is the same for Java and it fits on Win & *nix systems; of course, it
won't work the same on any OS, since in Win you have this horrible drives
concept (C: D: etc)

i.e 

(for Win)
java.home=C:/j2se1.4.2/bin

(for *nix)
java.home=/usr/local/java/1.4.2/bin


bottom line, you have to write properties for both OSes and pick them on the
fly by using something like <condition> [1] task. This kind of operation has
been discused in this list several times [2]

Hope this helps
Regards
Luis

[1] http://ant.apache.org/manual/CoreTasks/condition.html
[2] http://marc.theaimsgroup.com/?l=ant-user&m=109760252905015&w=2
    http://marc.theaimsgroup.com/?l=ant-user&m=107631038006160&w=2

-----Original Message-----
From: Thomas Saxtoft [mailto:TS@sondagsavisen.dk]
Sent: Monday, November 15, 2004 7:41 AM
To: user@ant.apache.org
Subject: Escapign backslash in java.home


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: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org

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


Mime
View raw message