Reputation: 11
I've been learning java recently and I need to be able to open .jar files, but outside of cmd, I can't anymore. .jar files just don't have an icon (it does, it's just a white square) and when i double click it, it prompts me to open as. I've followed a few things and opened it with java.exe, but it just closed down instantly.
Upvotes: 0
Views: 1047
Reputation: 481
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.
Upvotes: 1