🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.java.language
Article #15718

Q: Toolkit.getImage() paths

#15718
From: Lars Thuring
Date: Mon, 03 May 1999 00:00
20 lines
1205 bytes
Hi all,

I am trying to load an image from a different directory in a Java
program (not applet) by using:

   myImage =
Toolkit.getDefaultToolkit().getImage("d:\\devl0\\java\\image\\gfx\\bug2.gif");

   myImage = Toolkit.getDefaultToolkit().getImage(".\\gfx\\bug2.gif");

which fails. When loading from same dir as app code, e.g.:

   myImage = Toolkit.getDefaultToolkit().getImage("bug2.gif");

it works. I've also tried UNIX-path variations on the first by using
relative paths etc. to no avail. And, yes, it runs under W95.

TIA,

Lars
Technical Details
Message-ID: <372D7394.233A1AD6@Logopak.de>
Path: arc1-ca.pugleaf.net!unknown!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: f74b3,70413fe0d6c05533,start
X-Google-Attributes: gidf74b3,public
From: logopak@t-online.de (Lars Thuring)
Subject: Q: Toolkit.getImage() paths
Date: 1999/05/03
Message-ID: <372D7394.233A1AD6@Logopak.de>
X-Deja-AN: 473455451
Content-Transfer-Encoding: 7bit
X-Accept-Language: de,en
X-Sender: 0419599750-0001@t-online.de
Content-Type: text/plain; charset=us-ascii
X-Complaints-To: abuse@t-online.de
X-Trace: news07.btx.dtag.de 925725602 3892 0419599750-0001 990503 10:00:02
Organization: Logopak Systeme
Mime-Version: 1.0
Newsgroups: borland.public.jbuilder.java.language