开发者

Any good tool for browsing archives(Ear,War, Jar) on OSX [closed]

开发者 https://www.devze.com 2023-03-11 04:07 出处:网络
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.

Questions asking us to recommend or find a tool, library or favorite off-site resource are off-topic for Stack Overflow as they tend to attract opinionated answers and spam. Instead, describe the problem and what has been done so far to solve it.

Closed 9 years ago.

Improve this question

On Linux i can use file-roller and open an browse the content of an EAR file without manually open it, can even dig into contained WAR file and within that JAR files quickly.

This is another of those must have tools I'm missing on OSX (along with meld).

Any good开发者_JAVA技巧 tools that can do this ?

Update: I found a tool that fits my needs : http://www.zipeg.com/

Honorable mention to midnight commander (MC) - but it's command line (but very fast) as well as newer versions of VI (which can go into zipped files)


Any OS X ZIP utility that can open files without unpacking them will do. Alternatively, open a terminal window and type:

jar tvf <filename.jar>

You can drag the file from Finder to the Terminal window, and it will populate the filename for you. You can also pipe the output into less to scroll up and down.

jar tvf <filename.jar> | less


I copy it to a ".zip" file and then use my zip utilities to peek inside.

.ears, .wars, and .jars are just zip files with additional required items packed inside.

If you want to extract the contents, you can unzip them. Java contains a jar command that provides ability to zip / unzip the archives (and extra verifications that the archives are properly jar files).


You may also want to give Jarzilla a try.


If you can't already do it, make sure you can see the file extension on the *.jar. Change the name to *.zip, which will allow you to open the file as if it were a ZIP file (which it is). When you're done playing with the *.class files, change it back to *.jar so you can execute the file.

Although this is somewhat tedious, it doesn't require any new program installations and thus can be done on any computer, with or without admin rights.

0

精彩评论

暂无评论...
验证码 换一张
取 消