| Author |
view content of file in a jar file
|
Herbert Wilson
Greenhorn
Joined: Nov 18, 2003
Posts: 3
|
|
Hi, Is there a way to view the content of a file that is in a jar file. I can get a list of the files in a jar file by 'jar -tvf name.jar', but is there a way to view the content of a particular file without extracting the jar file.
|
 |
Joel McNary
Bartender
Joined: Aug 20, 2001
Posts: 1815
|
|
|
A jar file is juat a ZIP file. You can open it with any .ZIP utility (such as WinZIP if you're on a Windows platform), and (if the utility lets you -- WinZIP does), view the files there.
|
Piscis Babelis est parvus, flavus, et hiridicus, et est probabiliter insolitissima raritas in toto mundo.
|
 |
Herbert Wilson
Greenhorn
Joined: Nov 18, 2003
Posts: 3
|
|
|
Thanks Joel. Is there an UNIX utility that lets u view the content of the file?
|
 |
Loren Rosen
Ranch Hand
Joined: Feb 12, 2003
Posts: 156
|
|
On unix/linux you can do the following, to extract foo.java from name.jar: jar xf foo.java < name.jar That will write foo.java to stdout.
|
 |
 |
|
|
subject: view content of file in a jar file
|
|
|