It's not a secret anymore!*
The moose likes Beginning Java and the fly likes Read file from package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Read file from package" Watch "Read file from package" New topic

Read file from package

Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
I'm created package and package contained image file. but i can't download image from this package. how to load and read image file from package

Senior software engineer
David O'Meara

Joined: Mar 06, 2001
Posts: 13459

We had a discussion (complete with sample code!) here.
I hope this is what you were looking for. It refers to locating a properties file in a package, but all files are simply "resources" so there is little change to finding images.
Dorj Galaa
Ranch Hand

Joined: May 29, 2001
Posts: 113
I agree. Here's the link:
subject: Read file from package
Similar Threads
Write image to a file
image in binary
Reading a .wav file - security error
Read character from the tiff image file
Showing image from a JAR on a JSP page