3

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

Dagnarus
  • 65
  • 2
  • 7

2 Answers2

1
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

Martymoose
  • 68
  • 12
  • 2
    I must thank you. It didn't directly fix the problem, but it lead me to the answer. The .reg file gave me an error saying that it was not a valid registry script. But by going to the path that you gave me in regedit I deleted and remade the UserChoice key, restarted the computer and it was fixed. :-) **Edit: I don't have enough rep to upvote you or I would.** – Dagnarus Apr 20 '14 at 02:00
  • I had the issue of windows explorer opening recursively in the background when double clicked on a jar file. Removing the User Choice key allowed removal of this behavior. Once you remove this key, right click on any .jar file and in the context menu...open with->Choose Default Program-> Choose winzip or some other archive program and then check the box below to always make it the default program and click Ok. – santon Apr 24 '17 at 18:55
0

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.

eel ghEEz
  • 1,186
  • 11
  • 24