This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Executable jar - including image files Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Executable jar - including image files" Watch "Executable jar - including image files" New topic
Author

Executable jar - including image files

Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Hi guys,
have just created executable jar for a small test app which includes a jpeg that is drawn on a JPanel somewhere in the program. Problem is when I double click the jar the image is not appearing.
Is there any special way I need to add resources such as image files to a jar, or a special way to reference them in the app code? I assumed I could just include the jpeg in the jar and it would work, but apparently not.


SCJP 1.4, www.gsi3d.org.uk
John Smith
Ranch Hand

Joined: Oct 08, 2001
Posts: 2937
Is there any special way I need to add resources such as image files to a jar, or a special way to reference them in the app code?
Try this:
Ben Wood
Ranch Hand

Joined: Aug 14, 2001
Posts: 342
Thanks Eugene, that worked
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Executable jar - including image files
 
Similar Threads
Reading - Resizing - Writing Images
relative URL in jar files
Listing files in a JAR??
tiff file - how to verify it and get image details?
jar files