hi Damir,

if your image is nested in folders like /images/test/image.jpg in a jar-file, you can 
get it with:
InputStream in = getClass().getResourceAsStream("/images/test/image.jpg");
Now read bytes from the stream and create an image:
Image img = Toolkit.getDefaultToolkit().createImage(bytes[]);
Be sure the path to the jar-file in question is in your classpath.

Gernot
[EMAIL PROTECTED]

On Thu, 12 Oct 2000 11:15:07 +0200, Damir Arh wrote:

>Hello!
>
>This isn't really completely Java3D related but I came accross this problem
>while writing in Java3D so I decided to ask here. Is it possible to include
>the images necessary for the applet to run in a jar file? I tried to put
>them into the archive but JVM complained for not finding the image. Is it
>somehow possible to force Java to look for the image in a jar file or do I
>have to distribute images separately?
>
>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