ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Sturm <>
Subject Ant automatically doubles backslashes on MacOS X
Date Fri, 07 Feb 2003 19:11:35 GMT

I'm currently facing a serious problem using Ant on MacOS X using JDK 1.4.1. When trying to
compile files containing strings with backslashes in it, Ant automatically adds unwanted backslashes
to it. E.g.

if (directory.endsWith("\\")) {

which is perfectly valid, get's evaluated to

if (dierctory.endsWith("\\\")) {

which apparently is wrong.

To prevent misunderstandings, the source file is left untouched but the compiler complains
about the extra backslash. The same code and build file is used under Win and Linux without
any problems. It is also not an issue of the compile itself, because using IDEs with built
in compiling features (like Eclipse or IDEA) the same source code compiles fine even under
MacOS X. Unfortunately, I have to use the buildscript.

Please let me know if you have any idea how to get rid of these extra backslashes (despite
using File where appropriate).


View raw message