Feb 27, 2019 (The jar file must contain executable Java code for these steps to work.) Right-click the file and select Open With. In the Open With window, click the Browse button to open the File Explorer window. You need to find the Java executable file (java.exe file) on your computer hard drive.
- Aug 16, 2019 If you have a JAR file which is not running on its own, then you can use java JDK to run it. Open Command Prompt, and type java -jar nameofjarfile.jar. It will execute the JAR file automatically.
- If you find yourself unable to open.jar files on Windows 10, it is likely due to one of the following problems:.The Java Run-Time Environment is not properly set to run.jar files.
7-Zip is a file archiver with a high compression ratio.
Download 7-Zip 19.00 (2019-02-21) for Windows:
Link | Type | Windows | Size |
---|---|---|---|
Download | .exe | 32-bit x86 | 1 MB |
Download | .exe | 64-bit x64 | 1 MB |
Download 7-Zip 19.02 alpha (2019-09-05) for Windows:
Link | Type | Windows | Size |
---|---|---|---|
Download | .exe | 32-bit x86 | 1 MB |
Download | .exe | 64-bit x64 | 1 MB |
License
7-Zip is free software with open source. The most of the code is under the GNU LGPL license. Some parts of the code are under the BSD 3-clause License. Also there is unRAR license restriction for some parts of the code. Read 7-Zip License information.
You can use 7-Zip on any computer, including a computer in a commercial organization. You don't need to register or pay for 7-Zip.
The main features of 7-Zip
- High compression ratio in 7z format with LZMA and LZMA2 compression
- Supported formats:
- Packing / unpacking: 7z, XZ, BZIP2, GZIP, TAR, ZIP and WIM
- Unpacking only: AR, ARJ, CAB, CHM, CPIO, CramFS, DMG, EXT, FAT, GPT, HFS, IHEX, ISO, LZH, LZMA, MBR, MSI, NSIS, NTFS, QCOW2, RAR, RPM, SquashFS, UDF, UEFI, VDI, VHD, VMDK, WIM, XAR and Z.
- For ZIP and GZIP formats, 7-Zip provides a compression ratio that is 2-10 % better than the ratio provided by PKZip and WinZip
- Strong AES-256 encryption in 7z and ZIP formats
- Self-extracting capability for 7z format
- Integration with Windows Shell
- Powerful File Manager
- Powerful command line version
- Plugin for FAR Manager
- Localizations for 87 languages
7-Zip works in Windows 10 / 8 / 7 / Vista / XP / 2016 / 2012 / 2008 / 2003 / 2000 / NT.
p7zip - the port of the command line version of 7-Zip to Linux/Posix.
On 7-Zip's SourceForge Page you can find a forum, bug reports, and feature request systems.
Compression ratio
We compared 7-Zip with WinRAR 5.20.
FILE SETS: Mozilla Firefox 34.0.5 for Windows and Google Earth 6.2.2.6613 for Windows.
Archiver | Mozilla Firefox | Google Earth | ||
---|---|---|---|---|
65 files 85 280 391 bytes | 483 files 110 700 519 bytes | |||
Compressed size | Ratio | Compressed size | Ratio | |
7-Zip 9.35 -mx | 39 357 375 | 100% | 15 964 369 | 100% |
WinRAR 5.20 -m5 -s -ma5 -md128m | 41 789 543 | 106% | 17 035 432 | 107% |
Compression ratio results are very dependent upon the data used for the tests. Usually, 7-Zip compresses to 7z format 30-70% better than to zip format. And 7-Zip compresses to zip format 2-10% better than most of other zip compatible programs.
Active1 month ago
Running a .jar file in a command line works fine, but i am not able to run any .jar file by double clicking on my Windows 7 (64). It seems nothing happens after the double click.
I tried the
ftype
hint, no success:I reinstalled the JDK 7 64-bit, no success.
Any idea?
53770378,1011212 gold badges3333 silver badges6666 bronze badges
codercoder
66322 gold badges88 silver badges1111 bronze badges
19 Answers
What is listed in right-click-> Open With ?Is some other program listed as the default program ? Is a Java Runtime listed ? If a Java Runtime is listed, you can open with it, and make it the default program to run with.
ie,
Praveen Vinny2,03366 gold badges2727 silver badges3939 bronze badges
stratwinestratwine2,73122 gold badges2222 silver badges3232 bronze badges
If you have previously used the right click and opened with pathtoyourjavaw.exe then you will need to remove the following registry key.
[-HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.jar]
Then run
AshUKAshUK
You may also run it from the Command Prompt (cmd):
Dariusz WoźniakDariusz Woźniak6,08033 gold badges4141 silver badges6262 bronze badges
For Windows 7:
- Start 'Control Panel'
- Click 'Default Programs'
- Click 'Associate a file type or protocol with a specific program'
- Double click
.jar
- Browse
C:Program FilesJavajre7binjavaw.exe
- Click the button Open
- Click the button OK
4,94899 gold badges3939 silver badges6464 bronze badges
unpopularunpopular
If you try unpopular's answer:
For Windows 7:
- Start 'Control Panel'
- Click 'Default Programs'
- Click 'Associate a file type or protocol with a specific program'
- Double click
.jar
- Browse
C:Program FilesJavajre7binjavaw.exe
- Click the button Open
- Click the button OK
And jar files still fail to open (in my case it was like I never double clicked):
open the Command Prompt (to be safe with admin rights enabled) and type the following commands:
open the Command Prompt (to be safe with admin rights enabled) and type the following commands:
java -version
This should return a version so you can safely assume java is installed.Then run
Pc games key generator. Basically, the serial key generated with our tool is exact the same, what you would get if you would buy the game, because the key produced by this South Park The Stick of Truth key generator will give you a serial key. Download Here!
java -jar 'PATHTOFILEFILENAME.JAR'
Read through the output generated. You may discover an error message.
Community♦
P.Brian.MackeyP.Brian.Mackey25.5k5151 gold badges191191 silver badges293293 bronze badges
I had the same problem with .jar files not opening on a double click. It turned out that I had two versions of Java installed (Java 6 and 7). Uninstalling Java 6 from Control Panel-> Uninstall a Program was what finally allowed .jar files to open on a double click without using the command window.
RachaelRachael
I tried all above steps to resolve the problem but nothing worked. I had installed both JDK and JRE.
In my case, one jar file was being opened by double click while other was not being opened. I examined those files and the probable reason was that which was being opened, was created using JAVA SE 6 and the one not being opened was created using JAVA SE 7. Although, the problematic jar file was being run via command prompt (java -jar myfile.jar).
I tried Right Click -> Properties -> Change to javaw.exe with both in JDKbin directory and JREbin directory.
I was finally able to fix the problem by changing javaw.exe path (from JDKbin to JREbin) in registry editor.
Go to HKEY_CLASSES_ROOTjarfileshellopencommand, the value was,
I changed it to,
and it worked. Now the jar file can be opened by double click.
ePanditePandit1,69111 gold badge1616 silver badges1212 bronze badges
check out this link http://ostermiller.org/opening_jar_files.htmlprobably you haven't installed runtime or your system doesn't open .jar files with JAVA
mas-designsmas-designs
I had the problem that windows was blocking it from running (Windows 10 Pro). Right click icon> properties> in the bottom right corner it might tell you 'Windows has blocked the functionality....' next to it there is a check box labeled 'Unblock'> uncheck the box> apply> option to block goes away and then you can run it.
CodeMonkeyCodeMonkey
change the default application for JAR files from java.exe to javaw.exe from your JAVA_HOME/bin folder.
This is because, java.exe is console application only, but JAR file needs a window rendered execution. Since javaw.exe is a window application, it is preferred for the execution of JAR files.
An alternative to this is that to some extent you can use command prompt to run your JAR files by simply using java keyword with -jar attrib.
Rishav SharanRishav Sharan26911 gold badge44 silver badges1818 bronze badges
This is my way:
- Create file bat (example openJar.bat).
- Cut it and paste to C:Program FilesJavabin (this step is unnecessary, but you should it).
- Right click jar file > Properties > Choose open with (Change button ) and select your file bat.
- Double click your jar file to test it.
33.3k1515 gold badges4545 silver badges7070 bronze badges
HongarcHongarc2,70922 gold badges1111 silver badges2727 bronze badges
- Assuming you've loaded the Java JRE and/or Java SDK, then
- To do associations, go to 'My Computer', click on one of your drives (
C:
for instance). - When it is shown, choose 'Tools' »» 'Folder options' (or Properties.. it's in different places depending on the Windows version).
- Open Windows Explorer (just open any folder) to get the 'Tools' -> 'Folder options' window.
- When you get the 'Folder options' window, click on the tab 'File types'. You should be able to either edit or add JAR files (
.jar
extension) - Change the program used to open JAR files. In the file select window, go to the folder where the JRE is installed (should be
C:/Program Files/Java/..
, mark 'Always open with', and select thejavaw.exe
file.
4,94899 gold badges3939 silver badges6464 bronze badges
paulsm4paulsm484.3k1010 gold badges112112 silver badges138138 bronze badges
Installing the newest JRE fixed this for me.
Download Jar File Opener
(Even though I had a JDK and JRE(s) installed before.)
Aaron ThomaAaron Thoma
Your problem might also be inside your Java code setting, I mean, if your program somehow could not realize the main class/main file (entry point), it will not launch the the program/.jar (specially application built on IDE's). To solve that on an IDE :
- Right Click the project > Properties > Run > Browse Main Class > OK.
- Clean and Rebuild
Try running it now. Hope it helps
mustangDCmustangDC
It's not a file association problem since you can launch the application correctly through command line.
The problem is when you double click on an associated file the application starts and runs with the file's path as base execution path. Any relative path will be computed from the file path and everything you try to load will probably be missing.
Nothing happens, even if you surround all of your entry point code with try/catch(Exception) because java s throwing Throwables and not Exceptions: to fix this in your java entry point surround the content of the main method with a try/catch(Throwable) (base class for Exception and Error) and debug.
Mauro SampietroMauro Sampietro
I created a project, JAR_Runnr, for precisely this. =)
BoyBlueSkyBoyBlueSky
Had to try this:
- Open command prompt as admin
- Move to the file folder using
cd
command - Type
java.exe -jar *filename*.jar
- Press enter
The app should pop right after that.
The Humble AngyThe Humble Angy
I had this same issue, and searched the internet for a solution and none of the suggestions didn’t not open by double clicking the
.jar
file.In my case the reason is I have multiple JDK & JRE versions installed on my computer. Since I am a software developer working with several different versions for different clients I need to use multiple JDKs in my PC (Windows 10 Pro). So I do not want to change the system variables (i.e.
JAVA_HOME
, JRE_HOME
or PATH
), instead I use command prompt to run java in user process whenever I wanted to use a different version.When installing JDK it registers the
.jar
file association with latest version we installed in the PC. If you right click on the .jar icon and select properties, it will show that file opens with “Java(TM) Platform SE Binary”. If we look at the registry key: HKEY_CLASSES_ROOTjarfileshellopencommand
, it will point to latest JDK version.It is not a good idea (sometimes annoying) to change the registry key every time I want to run an app build from a different version.
So in my situation it is impossible to just double click the
.jar
file to execute it. But instead I found a work around solution myself. Scenario:
Multiple JDKs (1.7, 1.8, 9.0, 10.0, 11.0, and 12.0)are installed in the PC, so the latest installed was 12.0.
Problem
Want to double click an executable
.jar
developed using JDK 1.8 and didn’t workThis is my work around solution:
- Create a shortcut for the
.jar
file that you want to open. - Right click the shortcut icon and select properties -> Shortcut tab
- Change the text in the target (for example
'D:DevJavaApp1.8.jar'
) To'C:Program FilesJavajdk1.8.0binjavaw.exe
'-jar
'D:DevJavaApp1.8.jar
' - Then click ok Double click the shortcut.
It should now open the app.
DushDush
I had the same issue: if I doubleclick on a jar executable file, and my Java application does not start.
So tried to change manually also registry key, but it didn't help me. Tried to reinstall JDK newer/older without any result. (I have several versions of Java)
And I've solved it only using jarfix program. Jarfix automatically fixed .jar association problem on Windows system. (check regedit:
PCHKEY_CLASSES_ROOTjarfileshellopencommand
) What says Johann Nepomuk Löfflmann:
The root cause for the problem above is, that a program has stolen the .jar association. If you have installed the Java Runtime Environment the first time, the file type called 'jar' is assigned to javaw.exe correctly. 'jar' is an abbreviation for 'java archive' and javaw.exe is the correct program to execute a .jar. However, on Windows any program can steal a file type at any time even if it is already associated with a program. Many zip/unzip programs prefer to do this, because a jar is stored in the .zip format. If you doubleclick on a .jar, your pack program opens the file, rather than javaw runs the program, because your pack program ignores the meta information which are also stored in a .jar. In the Oracle bug database there is the low-priority report 4912211 'add mechanism to restore hijacked .jar and .jnlp file extensions', but it has been closed as 'Closed, Will Not Fix'.
You may also miss the file connection with .jar if you are using a free OpenJDK without an installer.
Notice:my OS is Windows 10, but logic is the same for 7, 8 and so on.
Helpful links:
https://windowsreport.com/jar-files-not-opening-windows-10/https://johann.loefflmann.net/en/software/jarfix/index.html
invzbl3invzbl3https://windowsreport.com/jar-files-not-opening-windows-10/https://johann.loefflmann.net/en/software/jarfix/index.html
64022 gold badges88 silver badges2525 bronze badges
protected by Community♦Apr 1 '13 at 16:44
Thank you for your interest in this question. Because it has attracted low-quality or spam answers that had to be removed, posting an answer now requires 10 reputation on this site (the association bonus does not count).
Would you like to answer one of these unanswered questions instead?
Would you like to answer one of these unanswered questions instead?