πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.swing
Article #10166

Re: Problem with URL

#10166
From: Paul Furbacher [TeamB]
Date: Thu, 04 Nov 1999 00:00
23 lines
1143 bytes
Michel PΓ©rez wrote:

>  I'm having a problem fetching an image from a file, using his URL for
>  accessing it. My icon files are kept in c:\aplicacion\images, so I tried
> the
>  following piece of code:
> 
>  try {
>    URL myUrl = new URL(file:///c:/aplicacion/images);

Assuming you are doing everything else correctly to load
the images, you need to write:

   URL myUrl = new URL("file://c:/aplicacion/images");

Just _two_ forward slashes after "file:" are necessary.  Not 
three, as you show above.


Paul Furbacher  (TeamB)
Technical Details
Message-ID: <38212C79.7A906F78@bilbo.bio.purdue.edu>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7vpenn$c374@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,9007e0e25ba0667d
X-Google-Attributes: gid111d45,public
From: "Paul Furbacher [TeamB]" <pf@bilbo.bio.purdue.edu>
Subject: Re: Problem with URL
Date: 1999/11/04
Message-ID: <38212C79.7A906F78@bilbo.bio.purdue.edu>
X-Deja-AN: 544280220
Content-Transfer-Encoding: quoted-printable
References: <7vpenn$c374@forums.borland.com>
Content-Type: text/plain; charset=iso-8859-1
Organization: Reverse Alchemy, Inc.
Mime-Version: 1.0
Reply-To: pf@bilbo.bio.purdue.edu
Newsgroups: borland.public.jbuilder.java.swing