I haven't tried this myself, but I have been told that the following might
help.

instead of

ImageIcon icon = new ImageIcon(getClass().getResource("image.gif"));

try:

.getResourceAsStream();

I don't know the details, but some info is available at

http://developer.netscape.com/docs/technote/java/getresource/getresource.htm
l

Cheers,

B.


-----Original Message-----
From: Damir Arh [mailto:[EMAIL PROTECTED]]
Sent: Thursday, October 12, 2000 11:29 AM
To: [EMAIL PROTECTED]
Subject: Re: [JAVA3D] Including images in a jar file


Hello!

> to load images from the jar file you have to use the getResource()
> method. I use something like this:

> ImageIcon icon = new ImageIcon(getClass().getResource("image.gif"));

Thanks. It works now. At the same time it solved my problem with IE not
wanting to load the images at all. Unfortunately Netscape 4.5 still doesn't
want to load the image from the JAR although I use the Plug-In in both
Netscape and IE.

I'll probably try upgrading Netscape to 4.75 and see if that helps.

Kind regards
--
Damir Arh
http://damir.gajba.net

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA3D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to