You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Stephen New <sn...@mincom.com> on 2001/03/09 03:15:21 UTC

Spaces in classpath

Hello,

Excuse me if this question has been asked before, but I couldn't see it on
the FAQ page.

My execution of the "java" built-in task fails because my the file paths in
the classpath have spaces in them. (Running on Windows NT). Basically I want
to simulate putting double-quotes around the classpath, like:

java -cp "f:\Filepath With Spaces" com.mycompany.MyClass

How do I do this? Or do I have to remove the spaces from my filepath?

Thanks.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Stephen New                                 ext. 3534
Software Engineer                Phone: 617 3303 3534
Applications Development           Fax: 617 3303 3257
Mincom Limited                         www.mincom.com
<http://www.mincom.com>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~



-- 
This transmission is  for the intended  addressee only and is confidential
information.  If you  have  received  this  transmission in error,  please 
delete  it and  notify  the sender.  The contents of this  e-mail are  the 
opinion of the writer only and are not endorsed by Mincom Limited unless
expressly stated otherwise.

RE: Spaces in classpath

Posted by Stephen New <sn...@mincom.com>.
 
> I have already fixed it. If the original poster has access to the nightly
> build, could you please try that?
> 
> Conor
> 

Yes, I've tried it. It seems to work now.

Thankyou,
Stephen New. 


-- 
This transmission is  for the intended  addressee only and is confidential
information.  If you  have  received  this  transmission in error,  please 
delete  it and  notify  the sender.  The contents of this  e-mail are  the 
opinion of the writer only and are not endorsed by Mincom Limited unless
expressly stated otherwise.

Re: Spaces in classpath

Posted by Conor MacNeill <co...@cortexebusiness.com.au>.
----- Original Message -----
From: "Stefan Bodewig" <bo...@apache.org>
To: <an...@jakarta.apache.org>
Sent: Friday, March 09, 2001 11:53 PM
Subject: Re: Spaces in classpath


> Stephen New <sn...@mincom.com> wrote:
>
> > My execution of the "java" built-in task fails because my the file
> > paths in the classpath have spaces in them.
>
> OK, this sounds like a bug. Would you please file a bug report at
> <http://nagoya.apache.org/bugzilla> so that it doesn't get lost?
>

I have already fixed it. If the original poster has access to the nightly
build, could you please try that?

Conor



Re: Spaces in classpath

Posted by Stefan Bodewig <bo...@apache.org>.
Stephen New <sn...@mincom.com> wrote:

> My execution of the "java" built-in task fails because my the file
> paths in the classpath have spaces in them.

OK, this sounds like a bug. Would you please file a bug report at
<http://nagoya.apache.org/bugzilla> so that it doesn't get lost?

Thanks

        Stefan

RE: Spaces in classpath

Posted by Steve Buroff <sj...@lucent.com>.
I can't fix it myself but I just wanted to comment that I
think not handling spaces in pathnames is a serious
bug that will make ant unusable for a lot of people
on Windows.

Personally, I hate spaces in pathnames but I appear
to be in the minority. Lots of people use them and
they should be supported.

Steve Buroff

-----Original Message-----
From: weiqi@smtp.networkusa.net [mailto:weiqi@smtp.networkusa.net]On
Behalf Of Weiqi Gao
Sent: Friday, March 09, 2001 7:35 AM
To: ant-user@jakarta.apache.org
Subject: Re: Spaces in classpath


Stephen New wrote:
>
> Hello,
>
> Excuse me if this question has been asked before, but I couldn't see it on
> the FAQ page.
>
> My execution of the "java" built-in task fails because my the file paths
in
> the classpath have spaces in them. (Running on Windows NT). Basically I
want
> to simulate putting double-quotes around the classpath, like:
>
> java -cp "f:\Filepath With Spaces" com.mycompany.MyClass
>
> How do I do this? Or do I have to remove the spaces from my filepath?

I'd say remove the spaces from your classpath for now if you don't have
the time to track down the problem.

If you know where the problem is, you can simply correct it in your own
copy of Ant.

If you want the official distribution to behave correctly too, send in a
patch, or post how the fix is done and let someone else generate the
patch.

--
Weiqi Gao
weiqigao@networkusa.net


Re: Spaces in classpath

Posted by Weiqi Gao <we...@networkusa.net>.
Stephen New wrote:
> 
> Hello,
> 
> Excuse me if this question has been asked before, but I couldn't see it on
> the FAQ page.
> 
> My execution of the "java" built-in task fails because my the file paths in
> the classpath have spaces in them. (Running on Windows NT). Basically I want
> to simulate putting double-quotes around the classpath, like:
> 
> java -cp "f:\Filepath With Spaces" com.mycompany.MyClass
> 
> How do I do this? Or do I have to remove the spaces from my filepath?

I'd say remove the spaces from your classpath for now if you don't have
the time to track down the problem.

If you know where the problem is, you can simply correct it in your own
copy of Ant.

If you want the official distribution to behave correctly too, send in a
patch, or post how the fix is done and let someone else generate the
patch.

--
Weiqi Gao
weiqigao@networkusa.net