双击无法打开.jar文件

时间:2020-08-27 18:33:53

标签: java windows jar

我最近一直在学习Java,我需要能够打开.jar文件,但是在cmd之外,我不能了。 .jar文件只是没有图标(它有一个白色的正方形),当我双击它时,它提示我打开为。我已经关注了几件事,并使用java.exe打开了它,但它立即关闭了。

2 个答案:

答案 0 :(得分:1)

To open a jar file in Windows, you must have the Java Runtime Environment installed. Alternatively, you can use decompression software, such as an unzip utility, to view the files in the jar archive.

If the jar file opens using an archive program, such as WinRAR or 7-Zip, and you want Java to open it instead, follow the instructions below. (The jar file must contain executable Java code for these steps to work.)

1-Right-click the file and select Open With.
2-In the Open With window, click the Browse button to open the File Explorer window.
3-You need to find the Java executable file (java.exe file) on your computer hard drive. It is often located in the "Program Files\Java" or "Program Files (x86)\Java" folder, within a possible subfolder below the Java folder. Once you find the file, select it and click OK.

答案 1 :(得分:0)

如果只需要打开jar文件,则可以使用7-Zip之类的文件解压缩器来查看其中的内容。