This question is a follow-up in response to this question: https://stackoverflow.com/questions/7235228/java-jar-open-with-windows-explorer-continually-spawns-explorer-processes. I have the same problem and now wish to not know why it happens but rather how to make it stop!

Apparently, sometime in the past I changed the extension of .JAR files on my computer to windows explorer. I do not know why as I know to just change the extension to .zip. It's possible that didn't work for some reason and I acted stupid. Regardless, now I seem to be suffering from a permanent "glitch" in Windows 7. Basically, windows 7 doesn't allow things to be reassociated once they have been associated with windows explorer (as then they are just folders I guess?). Perhaps that's why.

I'd really like for my JAR files to stop spawning 967 windows explorer entities and literally bogging my computer down to the point of almost crashing every time I forget to right click and select "open with".

I did find a potential fix within this thread: https://social.technet.microsoft.com/Forums/windows/en-US/9237ca68-645c-4718-9a51-24788f312c4b/windows-7-hangs-when-opening-a-file-with-explorerexe?forum=w7itproperf

My problem is that I have no clue what this "registry editor" is (I mean I have an inkling what they mean but don't know what program they refer to) and I do not know where to find this folder they refer to.

If possible, I would prefer a very simple explanation of what folder to navigate to and delete to reset my broken JAR file association without deleting or resetting any other file associations. I'd rather not have to reinstall windows or anything like that. I know this isn't a programming question per se, but this is a pretty serious problem for me and I'd like it fixed.

  • 1
    Hi! Try pressing Win+R and typing regedit and hitting enter... This should open up the Registry editor, where you can make the required changes. Be careful though, messing with the registry is not recommended if you don't know what you're doing. – rahuldottech Jun 2 '17 at 5:36

From the forum you linked:

  • Run Registry Editor
  • Browse to \HKEY_USERS\S-1-5-21-(random numbers with dashes)\Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts(whatever file extension is broken, i.e. '.jpg')\
  • Delete the folder called 'UserChoice'
  1. As rahul said : Registry Editor is the regedit.exe program, you can start it via Win+R, or by going to %windir% (most likelyc:\Windows) and executing that file.
  2. in the Registry Editor, select File->export, select all instead of selected branch, save this file, it will allow you to restore the regisery in case you make a mistake (just double click the file).
  3. \HKEY_USERS\S-1-5-21-(random numbers with dashes)\ is the registery of the user S-1-5-21-(random numbers with dashes) (this is the id for windows, not the user name), if you are fixing for the current user, you can go to \HKEY_CURRENT_USER\ instead. Then go to Software\Microsoft\Windows\CurrentVersion\Explorer\FileExts\.jar
  4. Delete the folder called 'UserChoice'
    • restart explorer **
  5. if that didn't work, you can go to HKEY_CLASSES_ROOTand delete the .jar "folder" (in the registry, this is called a key). that may remove association with .jar files for ALL users
    • restart explorer **
  6. if that also didn't work, you can try searching for .jar by pressing CTRL+F, typing .jar, selecting only keys and clicking search. then delete all the .jar keys. that may remove association with .jar files for ALL users, including if they set it for themselves.
    • restart explorer **
  7. if that still didn't work, restore the registry with the file you saved in 2. And I have no idea how to help you.

** to restart explorer you can either log out and log back in, or just end it with the task manager (ctrl+alt+del) by going to processes, selecting explorer.exe, then pressing del, followed by answering stop process after that, go to applications, click new task... and type explorer.exe, then click ok.

if after restarting explorer, the jar file is not associated with anything you need to either reinstall java, or right click on a .jar file, then select open with then go to your java installation folder, and select javaw.exe.

Note: if you are stuck with another file type, follow the same instructions, replacing .jar with the extension you are stuck with. Some problems might happen with .exe (starting in command line safe mode might be required) and .reg (select import in the registry editor instead of double clicking the file to restore the registry.)

Edit: you might also try to edit HKEY_CLASSES_ROOT\jarfile\shell\open\command\(default) and set it with "C:\Program Files\Java\jre1.8.0_131\bin\javaw.exe" -jar "%1" %* this should be changed with where your jre/jdk (e.g. javaw.exe or java.exe see here for difference) is located, before step 5

  • My computer only has one user anyways so 5 shouldn't hurt anything. – The Great Duck Jun 2 '17 at 15:01
  • Thanks. After deleting the folder it reset back to java. – The Great Duck Jun 2 '17 at 15:05

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.