Allow packaged Java programs to double-click to run directly

Source: Internet
Author: User

Start-run-enter "notepad" to open the text editor and enter the following:

The code is as follows Copy Code

Windows Registry Editor Version 5.00
; associated jar file, coded by Jerry Locke

; Delete Open list
[-hkey_current_user\software\ Microsoft\windows\currentversion\explorer\fileexts\.jar\openwithlist]

; register. jar file type
[hkey_classes_root\ . jar]
@= "Jarfile"

, setting. jar file type name
[hkey_classes_root\jarfile]
@= executable jar files

; Set. jar File Open Method
[Hkey_classes_root\jarfile\shell\open\command]
@= "\" d:\\java\\jre7\\bin\\javaw.exe\ "-jar \"% 1\ "%*"
[hkey_current_user\software\microsoft\windows\currentversion\explorer\fileexts\.jar\openwithlist]
"a" = "Javaw.exe"
"mrulist" = "a"
[hkey_current_user\software\microsoft\windows\currentversion\explorer\ Fileexts\.jar\openwithprogids]
"Jarfile" =hex (0):
[hkey_current_user\software\microsoft\windows\ Currentversion\explorer\fileexts\.jar]
"Application" = "Javaw.exe"

Save as a "Registerjarfileext.reg" file, double-click Import.

Now, you open the jar file directly.

(This method is also suitable for associating other programs, just a little modification)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.