Home >Java >javaTutorial >Why Can't I Double-Click to Run .jar Files on Windows 7 64-bit?
How to Double-Click to Run .jar Files on Windows 7 64-bit
Despite successfully executing .jar files through the command line, users may encounter difficulties running them by double-clicking in Windows 7 (64-bit). Double-clicking often yields no response.
Troubleshooting:
The ftype command has been attempted without success:
ftype jarfile="C:\Program Files\Java\jre7\bin\javaw.exe" -jar "%1" %*
Reinstalling JDK 7 64-bit has also proven ineffective.
Solution:
If the .jar files were previously opened using the right-click option and navigating to pathtoyourjavaw.exe, the following registry key must be removed:
[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar]
After removing the registry key, execute the following commands:
C:\>assoc .jar=jarfile C:\>ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
This should restore the ability to run .jar files by double-clicking on them.
The above is the detailed content of Why Can't I Double-Click to Run .jar Files on Windows 7 64-bit?. For more information, please follow other related articles on the PHP Chinese website!