This week's book giveaway is in the JavaFX forum.
We're giving away four copies of Introducing JavaFX 8 Programming and have Herbert Schildt on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Read files within a .jar Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Introducing JavaFX 8 Programming this week in the JavaFX forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Read files within a .jar" Watch "Read files within a .jar" New topic

Read files within a .jar

Xavier Poves

Joined: Jan 25, 2006
Posts: 2
My doubt is how I can accede to (or read) the files of resources (images, sounds, etc...) which they are within a jar, for example "resources.jar".
[ February 07, 2006: Message edited by: Xavier Poves ]
Garrett Rowe
Ranch Hand

Joined: Jan 17, 2006
Posts: 1296
From the command line you can type:

jar xf fileName.jar

[ February 07, 2006: Message edited by: Garrett Rowe ]

Some problems are so complex that you have to be highly intelligent and well informed just to be undecided about them. - Laurence J. Peter
I agree. Here's the link:
subject: Read files within a .jar
jQuery in Action, 3rd edition