You wouldn't have any issues if you used a nested classpath which
separates each classpath element in a <pathelement>, instead of using a
property in a properties file.

But you can always replace "program files" by progra~1, i.e. the DOS
short name with no spaces. --DD

> -----Original Message-----
> From: Colin S [mailto:[EMAIL PROTECTED]
> Sent: Monday, March 07, 2005 12:20 PM
> To: Ant Users List
> Subject: javac, classpath with spaces
> 
> Hello all,
> 
> I've been searching through the archives and the Web today trying to
> get the <javac> task working with a classpath that has spaces in it.
> 
> Basically, I have something like the following, defined in a property
> file
> 
>  classpath = c:\\program files\\rest\\of\\path;[... etc... ]
> 
> but when used as
> 
>  <javac classpath="${classpath}"
>         ... other properties ...
>         />
> 
> it fails with the following error:
> 
>  Expecting class path separator ';' before
>  'Files/Motorola/SDKv4-0forJ2ME/EmulatorA.1/lib/stubclasses.zip'
>  in argument number 1
> 
> I've tried a variety of things, including using quotes around the
> property value itself, as well as specifying
classpath='"${classpath}"',
> and so on, but nothing seems to work.
> 
> I guess my question is: is it possible to use spaces in the classpath
> property, or am I going to have to make sure that things are installed
> into locations with no spaces in the paths (which would be a real pain
> as this is for a generic build script that will be used on a number of
> machines).
> 
> I'm running Ant 1.6.2, and I've also tried the 2005-03-07 nightly with
> no luck :(
> 
> Any help appreciated. Thanks in advance.

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to