Windows – Changing default Java Runtime Environment from 1.8 to 1.7

installationjavajreuninstallwindows-registry

I'm currently trying to change the default JRE on my computer from 8 to 7.

I was attempting to fix a glitch involving the game Minecraft by updating to the JRE8 beta build, but it seems like that installer was corrupted and stopped midway before crashing. Now, whenever I try to launch any Java related program, it keeps on pointing to JRE8 even though it's installed. I attempted to reinstall it but the launcher doesn't seem to launch anymore even after I redownloaded it and tried several other builds.

I applied a temporary band-aid fix by either copying my JRE7 folder, pasting it, and renaming it to JRE8. Or I can also go into the registry and change the 1.8.0 registry (HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment\1.8.0) to point to the JRE7 folder instead of the JRE8 folder. If none of these two "fixes" are applied, I get a Launch4j error when I attempt to launch anything Java related:

enter image description here

How can I fix this?

Best Answer

Try:

Remove JRE 8

  1. Go to Uninstall a Program in your computers Control Panel
  2. Uninstall JRE 8

Install JRE 7

  1. Download JRE 7
  2. Install JRE 7

Update your Computer's JAVA_HOME system variable

  1. Right Click on Computer in the start menu
  2. Select Properties in the Drop down
  3. Click on Advanced System Settings
  4. Click on Environmental Variable under the Advanced Tab
  5. Under System Variables click New
  6. For Variable Name: write "JAVA_HOME" without quotations
  7. For Variable Value: write your computers path to the new install of JRE 7
  8. Click Okay, then Click Okay Again
  9. Restart the computer

Hopefully that helps, it worked for my downgrade from Java 8 to Java 7