How to browse a .zip file in IntelliJ (or .jar, etc.)

Intellij IdeaZip

Intellij Idea Problem Overview


I'd like to be able to "open up" (without unzipping) .zip files or .jar files in IntelliJ much like you can do in Eclipse by clicking the twisty. How do I do this with IntelliJ?

Intellij Idea Solutions


Solution 1 - Intellij Idea

Jar files visible in your project structure that cannot be expanded have not yet been "added" as libraries. Right click the jar file and select Add as Library...

Also see Configuring Module Dependencies and Libraries.

And: Correct way to add lib/*.jar to an IntelliJ IDEA project

Solution 2 - Intellij Idea

There is now a Intellij Plugin that solves that:

https://plugins.jetbrains.com/plugin/9491-archive-browser

Update: it works now also for nested archives. (tested 2019.1)

Solution 3 - Intellij Idea

While Christopher Peisert's answer works for archives that aren't nested (you are out of luck if you have an EAR containing WARs) it is tedious that for most archive types (JARs being the exception), you have to add the file as a library or a dependency from the Project Structure area of Settings.

If you want to see archives be the default operation and work for nested archives, please vote for this YouTrack Issue 126376

Solution 4 - Intellij Idea

I created a new Intellij plugin to implement it. It support basic archives and tar.gz extension, the key feature is nested archive support. It had uploaded to Jetbrain repository. You can install it from plugin marketplace. See plugin github page for more information File Expander.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionJoelView Question on Stackoverflow
Solution 1 - Intellij IdeaChristopher PeisertView Answer on Stackoverflow
Solution 2 - Intellij IdeapmeView Answer on Stackoverflow
Solution 3 - Intellij IdeapawelView Answer on Stackoverflow
Solution 4 - Intellij IdeaCamorkView Answer on Stackoverflow