Change Default Program for .jar File

9.3k Views Asked by At

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

2

There are 2 best solutions below

2
On BEST ANSWER
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

0
On

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.