ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Tim Gordon" <>
Subject File URLs for different plaforms
Date Mon, 24 Apr 2006 09:01:11 GMT

Not a pure ANT question, but it's relevant to building configurations for
remote systems, possibly of another OS...

 Is there a simple way to generate file URLs that are guaranteed to work on
another platform?

For example, something like:


doesn't work for *nix systems and Windows, because you'll get something like


which is fine under *nix, but

config.url=file://C:\Documents and Settings\user\

under Windows, which isn't a valid URL because it Java starts looking for a
host call 'C'.

The simplest way out seems to be to define my config.url propeties like


instead, because *nix absorbs the superfluous forward-slash but this doesn't
seem to be a very elegant solution.

Tim Gordon
Allustra Limited
Paxton House
30 Artillery Lane
E1 7LS
Tel +44 (0)20 7539 5722
Fax +44 (0)20 7539 5710

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

View raw message