my dog learned polymorphism*
The moose likes Java in General and the fly likes bundling images in a jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "bundling images in a jar" Watch "bundling images in a jar" New topic
Author

bundling images in a jar

Len Padson
Ranch Hand

Joined: Nov 21, 2011
Posts: 40
Is it possible tobundle images and text files in to a jar file using eclipse? if i want to make a program that uses images, but i dont want to have to always make sure the images a re in the same older as the jar?
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
They need to be added as a resource.
getResource(...)

the text file would be for viewing only
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: bundling images in a jar
 
Similar Threads
making a jar file of images
Jar drive me crazy
IDE: eclipse; Problem: embedded Images
Having issue accessing images inside jar
Add Image on to JFrame in jar file