简体   繁体   中英

Change Default Program for .jar File

Recently I was exploring the contents of a.jar file in 7-zip. I ended up changing the default program as I was opening and inspecting numerous jars. I do not remember how, but the default program was set to windows explorer. It now will not allow me to change the default program for any jar file.

I have tried:

Right Click>Open With>Choose Default Program - It allows me to choose a program to run it, but the check box for default is grayed out.

Control Panel>Default Programs>Associate A File Type Or Protocol With A Program -.jar does not appear in the list of file types.

Uninstalled the Java SE binary and re-installed the latest update.

Any help or suggestions will be appreciated.

Thanks, -Jarrod

Windows Registry Editor Version 5.00

[-HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\\.jar\UserChoice]

Make a .txt file the paste the above code save it as (anything you want) but make the file extension as .reg! Then open it a prompt should appear confirming the merge to the registry click "Yes". Restart your computer and you're done!

That should work it did for me

-Martin

There appears an additional (alternative) way to register a file open handler for a given extension XXX,

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\.XXX]
@="XXXfile"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\XXXfile]
@="XXXfile"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\XXXfile\DefaultIcon]
@="C:\\Program Files\\XXXApp\\XXXVer\\DIR\\XXX.ico"

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\XXXfile\shell]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\XXXfile\shell\Open with XXX Command]

[HKEY_LOCAL_MACHINE\SOFTWARE\Classes\XXXfile\shell\Open with XXX Command\command]
@="\"C:\\Program Files\\XXXApp\\XXXVer\\bin\\COMMAND.cmd\" \"%1\""

Just saying.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM