Unzipping a zip, rar, 7z, war file etc is always easier with WinZip, WinRAR, and 7z. But if you do not have permission to install any of these, java can be used to zip and unzip compressed files.
Here is the step by step guide to unzip a file without using WinZip and using java extractor.
Steps to unzip files without WinZip:
- Make sure JAVA_HOME is set in the Environment Variables.
- Add the <JAVA_HOME>\bin path to the path variable.
- Open a command prompt window and browse to the directory where the zip/war/jar is kept or create a new folder and put the zip file inside it. So, when the zip is extracted, it will extract the contents to the folder.
Read also: JPG vs JPEG: The difference between JPG and JPEG
- Type jar -tvf Sample.zip to know the contents of the zipped file
- Type jar -xvf Sample.zip to extract the files
I hope this helps to unzip files without using WinZip, WinRAR or any other software. Using Java to extract zip file is an awesome trick that many people don’t know.
Happy learning 🙂