JAR是一种文件格式,它通过将许多不同的文件(如元数据、图像、音频或目录)聚合到一个文件中以进行分发,从而提供文件夹的压缩版本。这些JAR文件可以作为 .jar 在压缩文件夹中找到,也可以在通过WinZip软件创建的文件中找到。该软件还有助于提取 .jar 文件夹。此外,它还归档和解压缩文件。JAR文件为我们提供了两大优势。无论是解压、查看或运行任何JAR文件,Java Runtime都是必需的。还有其他各种工具,如File Viewer Plus、WinZip、WinRar等可以打开(JAR)仅适用于Java Runtime的(Java Runtime)JAR文件。在本文中,我们展示了如何使用Java Windows 10打开 jar 文件。
如何在 Windows 10 中打开 JAR 文件(How to Open JAR Files in Windows 10)
JAR文件可以将数千个不同的文件聚合成一个应用程序,然后它们可以压缩文件夹的内容,从而减小文件夹的大小,从而帮助它们轻松地在网络之间传输。如果您想在Windows 10上打开(Windows 10)JAR文件,您需要做的第一件事是检查您的 PC 上是否已经安装了Java Runtime 。为此,请按照以下步骤操作。
1. 按Windows键。在搜索栏上输入Cmd并单击Open。
2.如图所示键入命令java -version并按(java -version)Enter。
3. 如果您收到以下消息,那么您的系统没有Java Runtime。
'java' 不是内部或外部命令、
可运行程序或批处理文件(‘java’ is not recognized as an internal or external command,
operable program or batch file )
如果您没有Java,则无法执行任何JAR或JRE文件。
如何安装 Java 运行时(How to Install Java Runtime)
Java Runtime是运行JAR文件的关键应用程序。一旦在您的系统中确定了Java存在,您就可以进行相应的操作。如果Java 运行时(Java Runtime)应用程序丢失,请按照以下步骤获取并安装它。
1.从官方下载页面(official download page)下载最新版本的Java。
2.根据您的系统要求选择版本。(Version)
3. 下载后,单击.exe setup 向下箭头并选择Open。
注意:(Note:) 双击(Double)也可以打开 .exe 安装文件。
4. 选择突出显示的安装(Install)按钮以开始安装过程。
5.等待(Wait)片刻以完成Java设置。
6.成功安装Java后单击(Java)关闭(Close)按钮。
Java安装只允许您使用下面给出的方法打开JAR文件。这是因为Java有时不与 .jar 扩展名关联。因此,在安装JRE后,遵循任何一种即将到来的方法打开(JRE)JAR文件不是必须的,而是安全的。
另请阅读:(Also Read:) 修复 Java 虚拟机或 JVM 未找到错误(Fix Java Virtual Machine or JVM not found error)
方法一:用Java平台库打开(Method 1: Open with Java Platform Library)
打开任何应用程序的基本且简单的方法是通过桌面快捷方式(desktop shortcut)。打开方式选项使您可以选择确定系统中已存在的文件格式类型以运行应用程序。(type of file)因此,您可以根据需要选择适用的格式。同理,JAR文件也可以用预装的适用于它的文件格式打开。按照步骤。
1. 右键单击 .jar文件并选择打开方式(Open with)选项。
2. 选择如图所示的Java(TM) Platform SE Binary应用程序,然后单击确定(OK)打开文件。
注意:(Note:) 单击更多(Click More)应用以查找启用 .jar 文件的其他相关应用。
方法二:通过Settings App执行JAR(Method 2: Execute JAR through Settings App)
要直接运行.jar,您需要将Java (TM) Platform SE Binary应用程序设置为默认值。这可以通过系统设置来完成。按照下面提到的步骤一一进行。
1. 按Windows键。转到设置(Settings)。
2. 选择应用程序(Apps)选项。
3.在左侧窗格中选择默认应用程序。(Default apps)
4. 单击按文件类型选择默认应用程序(Choose default apps by file type)。
5. 向下滚动并找到.jar选项。单击(Click)添加(Addition)符号并添加Java (TM) Platform SE 二进制文件(Java(TM) Platform SE binary)作为默认应用程序以打开.jar文件。
6. 设置默认应用程序后,返回包含 .jar 文件的文件夹并双击它。现在,您将能够直接打开文件。
另请阅读:(Also Read:) 如何在 Windows 10 上播放 OGG 文件(How to Play OGG Files on Windows 10)
方法 3:使用命令提示符(Method 3: Use Command Prompt )
也可以使用具有特定语法或格式的命令提示符控制台打开JAR 。(JAR)
注意:(Note:) JAR文件(JAR)应为可执行格式。要通过命令提示符打开JAR文件,请按照以下步骤操作。
1. 转到下载(Downloads)。右键单击Java安装.exe文件并选择Run as administrator。
2.在Windows搜索栏中键入命令提示符并选择(Command Prompt )以管理员身份运行(Run as administrator)。
3. 执行java -jar c:\pathtojarfile.jar命令,其中提到<pathtojarfile>上的 jar 文件的位置路径。
注意:(Note:)示例命令:java -jar C:\Users\GREEN\Desktop\test.jar
方法4:下载JAR文件打开器(Method 4: Download a JAR file opener)
也可以使用第三方应用程序打开JAR 。这些应用程序支持多个方面,使打开、查看和编辑文件变得更加容易。因此,请下载您选择的JAR打开器。
注意:(Note:) 7Zip 用作示例以进行说明。7zip 还提取JAR文件,使您可以查看 .jar 包的内容。尽管如此,Java 运行时环境(Java Runtime Environment)仍然是运行应用程序所必需的。
1、去7zip官网(7zip official website)下载。
2. 运行下载的 7zip .exe 安装文件。点击(Click)安装。_(Install)
3. 单击关闭(Close)以完成安装过程。
4. 启动7zip应用程序。选择.jar(.jar)文件的路径来运行它。
另请阅读:(Also Read:) 如何在 Windows 10 中打开 GZ 文件(How to Open GZ File in Windows 10)
方法五:使用第三方执行器软件(Method 5: Use Third-Party Executor Software)
只需单击即可执行JAR文件,请在 Windows 10 上安装第三方软件。执行程序JARX可用于此方法。要使用Java Windows 10(Java Windows 10)打开 jar 文件,请执行以下步骤。
1. 打开Jarx官网(Jarx’s official website),点击Jarx-1.2-installer.exe (74 kB)下载安装。
2. 运行安装程序并单击安装(Install)开始安装过程。
3.等待(Wait)安装完成,点击关闭(Close)完成。
4. 安装后,双击 .jar 文件直接启动它。
受到推崇的:(Recommended:)
我们希望您发现这篇文章很有用,并且您能够了解如何在 Windows 10 中打开 jar 文件(how to open jar files Windows 10)。让我们知道您接下来想了解什么。您可以通过下面的评论部分与我们联系,提出您的疑问和建议。
How to Open JAR Files in Windows 10
A JAR is a fіle format that provides a сomprеssed version оf a folder by aggregating many differеnt files like metadata, image, audio, or directories into one for distribution purposes. These ЈAR files can be found аs .jar in a zipped file folder or a file that is created via WinZip software. This software also helpѕ to extract the .jar folder. Additionally, it also archives and decompress thе files. The JAR files proνide us with two great advantages. Be it to decompress, view, or run any JAR files, Java Runtіme is mandatory. There are various other toоls like Filе Viewer Plus, WinZip, WinRar, etc to open JΑR files which only works with Java Runtime. In this artіcle, we have shоwn how to open jar files with Java Windows 10.
How to Open JAR Files in Windows 10
JAR files can aggregate thousands of distinct files to make a single application, then they can compress the contents of the folder which in turn reduces the size of the folder and thus helps them to transfer between networks easily. If you want to open a JAR file on Windows 10, the first thing you need to do is to check if you have Java Runtime installed already on your PC. To do so, follow the steps given below.
1. Hit the Windows key. Type Cmd on the search bar and click Open.
2. Type the command java -version as shown and hit Enter.
3. If you receive back following message, then your system does not have Java Runtime.
‘java’ is not recognized as an internal or external command,
operable program or batch file
If you do not have Java, then none of the JAR or JRE files can be executed.
How to Install Java Runtime
Java Runtime is the crucial application that runs the JAR files. Once the Java presence is determined in your system you can proceed accordingly. If the Java Runtime app is missing, grab and install it by following the steps given below.
1. Download the latest version of Java from the official download page.
2. Select the Version as per your system requirement.
3. Once downloaded, click on the .exe setup down arrow and select Open.
Note: Double click also works to open the .exe setup file.
4. Select the Install button as highlighted to start the installation process.
5. Wait for a few moments to complete the Java setup.
6. Click the Close button once the Java is successfully installed.
Java installation only permits you to open JAR files along with the method given below. This is because Java does not associate with the .jar extension sometimes. Therefore, it is not a must but safe to follow any one of the upcoming methods to open a JAR file after installing JRE.
Also Read: Fix Java Virtual Machine or JVM not found error
Method 1: Open with Java Platform Library
The fundamental and easy method to open any application is via desktop shortcut. The open with option gives you the choice to decide the type of file format that exists already in the system to run the application. Therefore, you can choose whichever format is applicable as per your need. In the same way, the JAR file can also be opened with the pre-installed file formats applicable to it. Follow the steps.
1. Right-click on the .jar file and select the Open with option.
2. Select the Java(TM) Platform SE Binary app as depicted and click OK to open the file.
Note: Click More apps to find other relevant apps that enable the .jar files.
Method 2: Execute JAR through Settings App
To run the .jar directly, you need to set the Java(TM) Platform SE Binary app as default. This can be done via system settings. Follow the steps mentioned below one by one.
1. Hit the Windows key. Go to Settings.
2. Select the Apps option.
3. Select Default apps on the left pane.
4. Click Choose default apps by file type.
5. Scroll down and locate the .jar option. Click on the Addition symbol and add Java(TM) Platform SE binary as the default application to open the .jar file.
6. Once the default app is set, go back to the folder which holds the .jar file and double click it. Now, you will be able to open the file directly.
Also Read: How to Play OGG Files on Windows 10
Method 3: Use Command Prompt
The JAR can also be opened using the command prompt console with a certain syntax or format.
Note: The JAR file should be in executable format. To open a JAR file via command prompt, follow the steps given below.
1. Go to Downloads. Right-click on the Java installation .exe file and select Run as administrator.
2. Type Command Prompt on the Windows search bar and select Run as administrator.
3. Execute the java -jar c:\pathtojarfile.jar command, where mention the location path of the jar file on <pathtojarfile>.
Note: Example command: java -jar C:\Users\GREEN\Desktop\test.jar
Method 4: Download a JAR file opener
A JAR opening can also be done with a third-party app. The apps support a plethora of aspects and make it easier to open, view, and edit files. Therefore, download a JAR opener of your choice.
Note: 7Zip is used as an example for illustration purposes. 7zip also extracts JAR files which allows you to view the contents of the .jar package. Still, Java Runtime Environment is compulsory to run the application.
1. Go to the 7zip official website to download it.
2. Run the downloaded 7zip .exe setup file. Click on Install.
3. Click Close to complete the installation process.
4. Launch the 7zip application. Select the path of the .jar file to run it.
Also Read: How to Open GZ File in Windows 10
Method 5: Use Third-Party Executor Software
To execute the JAR file with just a click, install third-party software on your Windows 10. The executor program JARX can be used for this method. To open jar files with Java Windows 10, implement the steps given below.
1. Open Jarx’s official website and click Jarx-1.2-installer.exe (74 kB) as highlighted to download the setup.
2. Run the setup and click Install to start the installation process.
3. Wait for the installation to complete and click Close to finish it.
4. Once installed, double-click the .jar file to launch it directly.
Recommended:
We hope that you found this article useful and you were able to learn how to open jar files Windows 10. Let us know what you want to learn about next. You can reach out to us with your queries and suggestions via the comments section below.