Can you configure Windows to open JAR files like ZIP files without a 3rd party tool?

39

16

I'd like to be able to examine the contents of a JAR file without having to install Winzip or some other tool and without having to rename the file. Windows Explorer can open ZIP files just fine; is there some registry setting I can use to let it treat JARs like ZIPs?

jodonnell

Posted 2008-09-12T01:28:54.397

Reputation: 525

4i wonder why this was migrated. why would anyone but a programmer be interested in this. – Jeff Martin – 2010-03-22T17:45:32.377

Answers

57

Or from the command line:

assoc .jar=CompressedFolder

Under Vista (or higher) you have to run this in an elevated Command Prompt.

rpetrich

Posted 2008-09-12T01:28:54.397

Reputation:

Also works on Windows 10 in CMD. Does not work in PowerShell. While you're doing this, I suggest you do it with .ear and .war, too. – ArtOfWarfare – 2016-03-03T20:25:40.563

1NB: for Vista and above, you'll probably need to run the command prompt with elevated privileges i.e. as Administrator. – Mal Ross – 2010-05-25T12:45:38.273

2Also, assoc .jar=jarfile to restore – Numeron – 2017-05-11T10:51:45.330

works on Windows 8 as well +1. Thanks! – yair – 2013-11-11T19:19:58.467

4

I tried exporting HKEY_CLASSES_ROOT\.zip, changing all references of '.zip' to '.jar' and importing it to HKEY_CLASSES_ROOT\.jar.

Under Vista at least it let me open a .jar file as if it were a .zip.

Brannon

Posted 2008-09-12T01:28:54.397

Reputation: 141

3

What you need to do is associate the JAR extension in Windows Explorer with Compressed folders. From Windows Explorer select tools / Folder Options. Then the Files Types tab. Select New and associate JAR Compressed (ZIP) Folder.

John Dyer

Posted 2008-09-12T01:28:54.397

Reputation: 331

0

The HKEY_CLASSES_ROOT trick doesnt work under Windows 7. There mut be some compelling reason that MSFT doesnt want us to do this.

Clark Battle

Posted 2008-09-12T01:28:54.397

Reputation:

Worked fine for me under Windows 7. – Brannon – 2009-11-30T04:29:11.040