πŸš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Problem with url

#10214
From: Olaf Raether
Date: Thu, 28 Oct 1999 00:00
37 lines
1248 bytes
On Wed, 27 Oct 1999 16:37:44 -0400, "Michel PοΏ½rez"
<mperez@eurobanco.com> wrote:

Michel

> hi,
>
> 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);
What about  URL myUrl = new URL(file://c:/aplicacion/images);

__ 
two slashes are enough.
> }
> catch (MalformedURLException e) {
>    ...
> }
> and then
> ImagSol = new ImageIcon(url,"sol.gif");
>
> that's when I'm having the exception:
> uncaught error fetching image: java.lang.NullPointerException
> at sun.awt.image.URLImageSource.getConnection(URLImageSource.java:106)
>
> Can anyone help me?
>
> thanks a lot,
>
> Mairobi
>
>
>
Technical Details
Message-ID: <3817e8d4.1586891@forums.inprise.com>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail
References: <7v7nl1$j4r12@forums.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 111d45,8358c00ef4759950
X-Google-Attributes: gid111d45,public
From: o.raether@windsoft.de (Olaf Raether)
Subject: Re: Problem with url
Date: 1999/10/28
Message-ID: <3817e8d4.1586891@forums.inprise.com>
X-Deja-AN: 541524390
References: <7v7nl1$j4r12@forums.borland.com>
Organization: Another Netscape Collabra Server User
Newsgroups: borland.public.jbuilder.java.swing