Home > Java > javaTutorial > Why Can't I Double-Click to Run .jar Files on Windows 7 64-bit?

Why Can't I Double-Click to Run .jar Files on Windows 7 64-bit?

Linda Hamilton
Release: 2024-11-19 10:04:02
Original
267 people have browsed it

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" %*
Copy after login

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]
Copy after login

After removing the registry key, execute the following commands:

C:\>assoc .jar=jarfile
C:\>ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
Copy after login

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!

Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Latest Articles by Author
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template