🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.api
Article #3585

Re: Universal Naming Convention (UNC) and the Java File Class

#3585
From: Andrew Bennett
Date: Thu, 13 Nov 1997 00:00
38 lines
1920 bytes
On Wed, 12 Nov 1997 13:43:57 -0700, "Dallas Harken"
<dharken@novell.com> wrote:

>I have a small application that reads a file on my network.  I use the File
>class to check the file's existence first.
>
>File f = new File(filePath);
>if (f.exists()) ...
>
>If I map a drive to the network location, ie. filePath =
>"p:\dir\myfile.txt", everthing works great.
>
>However, if I set filePath = "//server/volume/dir/myfile.txt", the exists
>function returns false.  Using / or \ as a separator doesn't matter.
>
>Interesting note: Works when compling with Visual J++ works, but not with
>JBuilder.
>
>I also get a FileNotFoundException if I use the same file path with the
>FileInputStream class.  Could it be a problem with the native implementation
>of functions such as open, etc?
>
>Any ideas?


I do recall some UNC filename problems with JavaSoft's JDK.  That may
explain why it works in Microsoft's tool, and not ours.  I'd suggest
you search JavaSoft's bug database on their web site to see if the
problem exists, or if there is a workaround.


Andrew
--
  Andrew Bennett            ->  abennett@borland.com
  JBuilder info             ->  http://www.borland.com/jbuilder/
  JBuilder newsgroups info  ->  http://www.borland.com/newsgroups/
**** Please don't post a reply AND send email.  Do one.  I'll see it. ****
Technical Details
Message-ID: <346a4665.82131548@forums.borland.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <64d439$rpu3@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 1089d0,5d21d90b0c733d09
X-Google-Attributes: gid1089d0,public
X-Google-Thread: f74b3,5d21d90b0c733d09
X-Google-Attributes: gidf74b3,public
From: abennett@borland.com (Andrew Bennett)
Subject: Re: Universal Naming Convention (UNC) and the Java File Class
Date: 1997/11/13
Message-ID: <346a4665.82131548@forums.borland.com>
X-Deja-AN: 289117676
References: <64d439$rpu3@forums.borland.com>
Organization: None
Newsgroups: borland.public.jbuilder.java.api,borland.public.jbuilder.java.language