首頁 > Java > java教程 > 主體

如何在 Windows 7 64 位元中雙擊運行 JAR 檔案?

Linda Hamilton
發布: 2024-11-13 16:40:02
原創
907 人瀏覽過

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_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts.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:\path\to\your\javaw.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.

以上是如何在 Windows 7 64 位元中雙擊運行 JAR 檔案?的詳細內容。更多資訊請關注PHP中文網其他相關文章!

來源:php.cn
本網站聲明
本文內容由網友自願投稿,版權歸原作者所有。本站不承擔相應的法律責任。如發現涉嫌抄襲或侵權的內容,請聯絡admin@php.cn
作者最新文章
熱門教學
更多>
最新下載
更多>
網站特效
網站源碼
網站素材
前端模板