Title: RE: UNC paths

Again, the answer depends on whether you (or rather, the task in question) are interpreting that path inside Java code, or if you are spawning a shell to do something with that path.

The default shell (CMD.EXE) on Windows NT insists on seeing the UNC path with backslashes (\) only. I.e. it only wants \\host\resource\path.

On the other hand, inside the kernel, NT is perfectly happy with both *forward* and backward slashes. So a "UNC" path of the form //host/resource/path is quite usable from within applications, or even alternate shells.

You can see this for yourself, by just opening a UNC of the form "//host/resource/path" as a FileInputStream, and reading its contents..

However, *some* of the Ant tasks seem to spawn a native shell to do their work (don't quite know which yet), and those may not work with forward-slashed UNCs. But most tasks should work just fine.

(If you are passing in UNCs to ant from the command line on Windows NT, you can *still* use forward-slashes. CMD.EXE is only picky about its own direct file or path arguments - arguments sent to spawned children can contain forward slashes..)

> -----Original Message-----
> From: Matt Lyon [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 12:58 PM
> To: [EMAIL PROTECTED]
> Cc: [EMAIL PROTECTED]
> Subject: UNC paths
>
>
> Diane,
>
> Thanks for the response.
>
> I do have another question, however. I noticed that in an 
> earlier post you
> had asked if Ant knows how to handle UNC path conventions,
> like a "\\" in
> paths:
>
> http://marc.theaimsgroup.com/?l=ant-user&m=97241025908510&w=2
>
> Did you ever get an answer on that?
>
> I am trying to specify a UNC path for the destdir parameter
> in my javadoc
> task, but Ant appears to just be ignoring the first slash in
> the UNC path
> and bonking. I could write an ftp task to handle uploading
> the javadocs to
> the remote machine, but I am just being lazy and looking for
> an easy way to
> do it. Since cmd.exe (a.k.a. the good ol' DOS prompt window) does not
> support UNC paths, it's no surprise that Ant doesn't either.
> Just curious...
>
> Cheers,
>
> Matt
>
> -----Original Message-----
> From: Diane Holt [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 11, 2001 12:56 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Formatting HTML text using javadoc "bottom" parameter
>
>
> --- Matt Lyon <[EMAIL PROTECTED]> wrote:
> > bottom="<i>Copyright ) 2000 Dummy Corp. All Rights Reserved.</i>">
>
> The example has been corrected in CVS. See:
> http://jakarta.apache.org/cvsweb/index.cgi/jakarta-ant/docs/ma
nual/CoreTasks
/javadoc.html?rev=1.10&content-type=text/vnd.viewcvs-markup

Click on "(as text)" to see the formatted file.

Diane

=====
([EMAIL PROTECTED])



__________________________________________________
Do You Yahoo!?
Get personalized email addresses from Yahoo! Mail
http://personal.mail.yahoo.com/

Reply via email to