Aright, I'm pretty much a java newbie. I understand the basics of the language but have never done real work in it. Currently I find myself on a project where I'm going to have to do some java development. I'm at a stage now where I'd like to know whats in all of the jar files utilized by a 3rd party software company that I am interfacing a portal gadget into. there are a ton of jar files, I've isolated the one I want to view the contents of, but how do I open the darn thing? I've tried wordpad which obviously doesn't work. Is there some commands I need to run to seperate the .jar file and then be able to view the contents? Thanks for any help on this simple/novice problem. Geoff
I strongly recommend WinRar which is very useful for exploring several kinds of compressed files including ZIP, WAR, TAR etc. I am sure you'ld delighted to get it.
Ashik Uzzaman Senior Software Engineer, TubeMogul, Emeryville, CA, USA.
Joined: Jan 23, 2002
Geoff, if you decide to use WinZip/WinRAR/whatever tools for handling your .jar/.war/.ear files, do remember that a valid .jar file must contain the META-INF/MANIFEST.MF file, which is added by default by the jar utility. With WinZip and others, you must create and add the manifest file yourself (it's not difficult, though).
The commands lasse gave are right..but u can add option 'v' to get a verbose version ..
// Gives the table of contents in verbose fashion jar -tvf similarly, //Extracts the files by displaying the information of every file that is being extracted. jar -xvf
Joined: Jul 10, 2003
well thanks for the help! I just used the simple winzip tool and got a peek at all the class files in the jars... I dont know what I was thinking though, looking at .class files is useless to me! I'm trying to figure out why a .jsp call I'm making is failing and thought that by looking at the code of the method I might get a better handle on things. Any suggestions? Is there a way to view a .java file from a .class file?