You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by Colin 't Hart <ct...@gbs.com.au> on 2000/07/05 04:02:36 UTC

Take 2: Problem: Using Jikes on NT with spaces in working directory

Hello,

I made the following changes to Ant to allow compilation
using Jikes when spaces exist in paths:

line 567:        argList.addElement("\"" + destDir.getAbsolutePath() +
"\""); // CH 4/7/00
569:        argList.addElement("\"" + classpath.toString() + "\""); // CH
4/7/00
640:            args[counter] = "\"" + (String)enum.nextElement() + "\""; //
CH 4/7/2000


Cheers,

Colin

Colin 't Hart               tel: +61 (03) 6223 1999
Systems Analyst             fax: +61 (03) 6223 1988
Geographic Business Systems
PO Box 844 SANDY BAY, Tasmania 7006


Re: Take 2: Problem: Using Jikes on NT with spaces in working directory

Posted by Stefan Bodewig <bo...@bost.de>.
>>>>> "CtH" == Colin 't Hart <ct...@gbs.com.au> writes:

 CtH> I made the following changes to Ant to allow compilation using
 CtH> Jikes when spaces exist in paths:

I had deliberately omitted that change when I modified javac yesterday.

The class Jikes calls the compiler jikes via Runtime.exec(String[]). I
was under the assumption that this method guaranteed that spaces
inside args won't cause problems (as the args have been splited
already).

I'm quite sure this works as expected (by me) under Unix and wanted to
investigate where your problem stems from first. Is it Jikes that is
doing some strange argument processing of its own or is it Java on
Windows that's not doing the right thing.

As I'm not a Windows guy at all - otherwise I had taken a look at the
patch to Exec to support Win98 BTW - I cannot check for the second
option and unfortunately haven't found time to check Jikes+classpath
with spaces+Linux yet.

If nobody else steps in I might find some time by the end of this
week.

Stefan

Re: Take 2: Problem: Using Jikes on NT with spaces in working directory

Posted by Stefan Bodewig <bo...@bost.de>.
Silly me, forgot the attachment.


Re: Take 2: Problem: Using Jikes on NT with spaces in working directory

Posted by Stefan Bodewig <bo...@bost.de>.
Hi all,

I was trying to figure out what is wrong with Process.exec(String[])
on NT or with Jikes - I'm on a dead end road here.

The appended little program generates

Arg 0: 1
Arg 1: 2
Arg 2: 3
Arg 0: 1
Arg 1: 2 3
Arg 0: 1
Arg 1: "2 3"

on Linux - which is what I had expected on any platform BTW. On NT I
get the same result except for the last line where the quotes are
stripped - no difference between run 2 and run 3 on NT. On Windows 98
I get no output at all.

According to Colin Jikes doesn't like spaces in the argument to
-classpath unless he puts quotes around the argument - my test seems
to imply that this doesn't make a difference at all.

Of course we could put the quotes in just to solve the problem, but
I'd appreciate to know what the cause of the problem is.

Anybody with more insight?

Stefan