Home  >  Article  >  Java  >  How to Run JAR Files with Double-Clicks in Windows 7 64-bit?

How to Run JAR Files with Double-Clicks in Windows 7 64-bit?

Linda Hamilton
Linda HamiltonOriginal
2024-11-13 16:40:02908browse

How to Run JAR Files with Double-Clicks in Windows 7 64-bit?

Running JAR Files with Double-Clicks in Windows 7 64-bit

Unable to launch JAR files with a double-click in Windows 7 (64-bit)? Here's how to resolve the issue:

Problem:

Double-clicking JAR files evokes no response. Attempts to modify the registry key (ftype) have been unsuccessful.

Solution:

If you previously assigned the ".jar" extension to a specific Java executable ("javaw.exe") via the right-click option, it's necessary to remove this registry setting.

  1. Navigate to the following registry key:

    [-HKEY_CURRENT_USERSoftwareMicrosoftWindowsCurrentVersionExplorerFileExts.jar]

  2. Delete this registry key.
  3. Run the following commands in an elevated Command Prompt (run as Administrator):

    C:\> assoc .jar=jarfile
    C:\> ftype jarfile="C:\path\to\your\javaw.exe" -jar "%1" %*
  4. Replace "C:pathtoyourjavaw.exe" with the actual location of the "javaw.exe" executable.

After performing these steps, double-clicking JAR files should execute them using the "javaw.exe" executable.

The above is the detailed content of How to Run JAR Files with Double-Clicks in Windows 7 64-bit?. For more information, please follow other related articles on the PHP Chinese website!

Statement:
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