What would be the easiest way to view classes, methods, properties, etc. inside a jar file? I\'m looking for something equivalent to the very useful Lutz Roeder .NET Ref
You could try JarSpy. There is an IDEA plugin version of it that I use.
I usually open them with 7-Zip... It allows at least to see packages and classes and resources.
Should I need to see methods or fields, I would use Jad but of course, it is better to rely on (good) JavaDoc...
Now, somewhere on SO was mentioned some Eclipse plug-ins, to find in which jar file a class is located, perhaps they can do more (ie. what you requested).
[EDIT] Reference to SO thread. Not what is asked, but somehow related, thus useful: Java: How do I know which jar file to use given a class name?
You can view JAR files like ZIP files from Windows Explorer by doing the following:
From the command line, enter:
assoc .jar=CompressedFolder
While you are at it, you might as well do the same for WAR and EAR files:
assoc .war=CompressedFolder
assoc .ear=CompressedFolder
If you like to see whats inside, simply rename as first option below..
F2 & Rename to jarfile.zip
//Use any unzipper...
jar tvf jarfile.jar
jar tf jarfile.jar
If you are in windows and using powershell and you are looking for a file in a jar you can do:
jar -tf .\[JAR_NAME] | where {$_ -match "[FILENAME]"}
I've set the default action in windows to "Open with WinZip". This makes it easy to manage JARs as archives. You can even add/remove files manually.