ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Loughran" <>
Subject Re: Ant automatically doubles backslashes on MacOS X
Date Fri, 07 Feb 2003 19:18:00 GMT

----- Original Message -----
From: "Thorsten Sturm" <>
To: <>
Sent: Friday, February 07, 2003 11:11
Subject: Ant automatically doubles backslashes on MacOS X

> Hi,
> 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.

Well, it shouldnt be an ant problem, because ant doesnt supply the compiler.
It just hands off to javac, running it inside its own process or in a
separate one. Maybe this is a bug with the (still beta, right?) JDK1.4.1 on
that system.

1. what happens with fork=true in javac?
2. what happens when you set the compiler to jikes (assuming you have

View raw message