您以前可能遇到过存档文件。一种常见的存档文件类型是ZIP 文件(ZIP file)。您可能遇到的另一种存档文件类型是JAR 文件(JAR file)。我们将看看这个文件是什么以及在Windows上打开(Windows)JAR 文件(JAR file)的最佳应用程序。
ZIP文件和JAR文件等存档文件提供了一种将多个文件打包为单个文件(package multiple files as a single file)的方法,从而减少了存储它们所需的空间量。JAR代表J ava Ar韭菜。它是一种包文件格式(package file format),用于将多个Java 类(Java class)文件及其相关资源(如文本和图像(text and images))组合到一个文件中。
事实上,最初开发JAR文件是为了让最终用户可以在单个(JAR)HTTP 请求中下载(HTTP request)Java小程序及其组件。
如果您在未安装可打开该文件类型(file type)的兼容程序的情况下尝试打开JAR 文件(JAR file),您可能会看到一条错误消息:“无法访问JAR 文件。(JAR file.)” 在这种情况下,请尝试以下应用程序之一在您的Windows 计算机上打开(Windows computer)JAR 文件(JAR file)。
JAR文件可以通过两种方式打开:
- 打开并浏览文件内容
- 在 Java 中运行 JAR 文件(执行)
我们将介绍一些应用程序来帮助您浏览和检查JAR文件的内容。
在 Windows 上打开 JAR 文件的应用程序
您可以使用几个程序来浏览和查看Windows 计算机上的(Windows computer)JAR 文件(JAR file)内容。我们将介绍其中的一些。您甚至可能会发现您已经有一个能够在您的计算机上打开JAR 文件(JAR file)的应用程序。
1.WinRar
WinRar 是您可以免费下载和运行的共享软件(shareware),但它会不断提醒您购买许可证。在任何情况下,下载 WinRar(download WinRar),安装它,然后用它打开一个JAR 文件(JAR file)。使用WinRar打开JAR 文件(JAR file)后,您可以提取其内容。
2. 7-Zip
与WinRar类似,7-Zip是一个存档查看器和提取器(viewer and extractor),可用于打开JAR文件。与WinRar不同,7-Zip是免费和开源的。在此处为 Windows 下载它(Download it for Windows here)。安装后,您可以打开一个JAR 文件(JAR file),将其解压缩,然后查看存档包含的文件。只需(Simply)右键单击JAR 文件(JAR file),选择Open With并选择7-Zip File Manager。
如果您没有看到使用 7-Zip文件管理器(File Manager)打开文件的选项,请选择选择另一个应用程序(Choose another app)选项,然后从列表中选择 7-Zip文件管理器(File Manager):
选择始终使用此应用程序打开 .jar 文件(Always use this app to open .jar files)选项以使 7-Zip 成为默认的JAR 文件(JAR file)查看器。
在线打开 JAR 文件的应用程序
当所有其他方法都失败时,您始终可以使用在线工具打开JAR 文件(JAR file)。有几种可供选择。下面列出的所有在线工具都允许您将JAR 文件(JAR file)放入网站并下载内容。如果您不经常遇到(t encounter)这些存档并且不想安装新软件,这是一个不错的选择。
3.在线档案提取器(Online Archive Extractor)
Online Archive Extractor是一个基于浏览器的工具,您可以使用它来提取多种存档文件,包括JAR文件。该站点是安全的,并且由于该工具在浏览器内本地运行(即,不是服务器端),您可以放心,您的文件不会通过 Internet 发送。您还会发现使用Online Archive Extractor提取(Online Archive Extractor)JAR文件比其他一些存档提取器更快,因为几乎没有数据在线传输。
AppsCMS的JAR File Opener与Online Archive Extractor的工作方式略有不同。它确实将您的文件传输到其服务器。但是,他们确实向用户保证,“我们仅将您的Jar文件存储很短的时间,以便提取内容,然后删除这些文件。我们不会存储您的任何JAR 或(JAR or contents)您的JAR的内容。” 由于它也是在线的,因此此选项也适用于在Mac、Linux、Ubuntu和所有版本的Windows上打开(Windows)JAR文件。
5.在线Java反编译器(Online Java Decompiler)
Online Java Decompiler由巴西(Brazil)的Leonardo Santos提供。他的工具可以在线反编译 .jar 和.class文件。这是一个简单的工具,完全按照它所说的去做。您从JAR 文件(JAR file)中提取的大多数文件都是文本文件,但有些可能是需要其他应用程序才能查看的其他类型的文件。
EzyZip 的提取 Jar 文件工具比其他在线(Extract Jar File Tool)JAR 文件打开(JAR file)器有更多的花里胡哨。使用该工具提取的一些文件可以在浏览器中预览,您还可以选择一次将多个文件和文件夹保存到您选择的目标文件夹(target folder)中。
7.自由文件转换(FreeFileConvert)
我们列表中的最后一个条目与其他条目略有不同。FreeFileConvert中的将JAR 转换(Convert JAR)为 ZIP 工具将您的JAR 文件(JAR file)转换为可以在Windows中本地打开的(Windows)ZIP 文件(ZIP file)。您要转换的JAR 文件(JAR file)可以在您的计算机上,也可以在Google Drive 或 Dropbox(Google Drive or Dropbox)等云服务中。此外,如果您有JAR 文件的(JAR file)URL,您可以输入它并使用此工具将其转换为ZIP 文件(ZIP file)。
使用Java 运行时环境(Java Runtime Environment)运行JAR 文件(JAR Files)
到目前为止,我们已经讨论了查看(viewing)JAR 文件的方法。如果要运行(run)这些文件,则需要使用Java Runtime Environment。查看我们关于如何在 Windows 上运行 JAR 文件(how to run JAR files on Windows)的文章,了解如何在您的计算机上安装Java并在(Java)Java 运行时环境中运行(Java Runtime Environment)JAR文件。
7 Best Apps to Open JAR Files on Windows
Υou’νe рrobably encountered archive files before. A common tуpe of archive file іs a ZIP file. Another type of archive file you might come across is a JAR file. We’ll take a look at what this file is and the best apps to open JAR files on Windows.
Archive files like ZIP files and JAR files provide a way to package multiple files as a single file, decreasing the amount of space needed to store them. JAR stands for Java Archive. It’s a package file format used to combine multiple Java class files and their associated resources like text and images into a single file.
Indeed, JAR files were originally developed so end users could download Java applets and their components in a single HTTP request.
If you try to open a JAR file without having a compatible program installed that can open that file type, you might see an error saying, “Unable to access JAR file.” In that case, try one of the apps below to open a JAR file on your Windows computer.
JAR files can be opened in two ways:
- Open and browse the file contents
- Run the JAR file in Java (execute)
We will take a look at apps to help you browse and examine the contents of JAR files.
Apps to Open JAR Files on Windows
There are several programs you can use to browse and view JAR file contents on a Windows computer. We’ll run through a few of them. You might even find you already have an app capable of opening JAR files on your computer.
1. WinRar
WinRar is shareware that you can download and run for free, but it will persistently remind you to buy a license. In any case, download WinRar, install it, and use it to open a JAR file. Once you’ve opened the JAR file with WinRar, you can extract its contents.
2. 7-Zip
Similar to WinRar, 7-Zip is an archive viewer and extractor that you can use to open JAR files. Unlike WinRar, 7-Zip is free and open source. Download it for Windows here. Once you’ve installed it, you can open a JAR file, extract it, and view the files the archive contains. Simply right-click on the JAR file, choose Open With and select 7-Zip File Manager.
If you don’t see the option to open the file with 7-Zip File Manager, select the Choose another app option, and choose 7-Zip File Manager from the list:
Select the Always use this app to open .jar files option to make 7-Zip the default JAR file viewer.
Apps to Open a JAR File Online
When all else fails, you can always use an online tool to open a JAR file. There are several to choose from. All of the online tools listed below allow you to drop a JAR file into the website and download the contents. This is a good option if you don’t encounter these archives often and don’t want to install new software.
The Online Archive Extractor is a browser-based tool you can use to extract several kinds of archive files, including JAR files. The site is secure, and, since the tool works locally inside the browser (i.e., not server-side), you can rest assured that your files won’t be sent over the internet. You’ll also find that extracting JAR files using the Online Archive Extractor is speedier than some other archive extractors since virtually no data is being transferred online.
The JAR File Opener from AppsCMS works a little differently than the Online Archive Extractor. It does transfer your file to its servers. They do, however, assure users, “We store your Jar files only for a very short duration for extracting content and then delete the files. We do not store any of your JAR or contents of your JARs.” Since it’s online too, this option will also work for opening JAR files on Mac, Linux, Ubuntu, and all flavors of Windows.
The Online Java Decompiler is made available by Leonardo Santos of Brazil. His tool decompiles .jar and .class files online. It’s a simple tool that does exactly what it says it does. Most of the files you extract from a JAR file will be text files, but some may be other types of files that require additional apps to view them.
EzyZip’s Extract Jar File Tool has a few more bells and whistles than the other online JAR file openers. Some files extracted with the tool can be previewed within the browser, and you also have the option to save multiple files and folders into a target folder of your choosing all at once.
The last entry in our list is a little different than the others. The Convert JAR to ZIP tool from FreeFileConvert converts your JAR file into a ZIP file you can open natively in Windows. The JAR file you want to convert can be on your computer or in a cloud service like Google Drive or Dropbox. Additionally, if you have the URL of a JAR file you can enter it and use this tool to convert it to a ZIP file.
Running JAR Files with the Java Runtime Environment
So far, we’ve discussed ways of viewing JAR files. If you want to run those files, you’ll need to use the Java Runtime Environment. Check out our article on how to run JAR files on Windows to learn how to install Java on your computer and run JAR files in the Java Runtime Environment.