/JDK_PATH_FIXER

How to properly change the java path to the later version (Windows)

Primary LanguageBatchfile

JDK_PATH_FIXER

  • How to properly change the java path to the later version (Windows)

Problem

  • After updating java to a later version, when I run java in command prompt, I got this problem: *> Error: Registry key 'Software\JavaSoft\Java Runtime Environment'\CurrentVersion' *> has value '1.8', but '1.7' is required. *> Error: could not find java.dll *> Error: Could not find Java SE Runtime Environment.

Solution

  • Run the bat file provided in this github

Usage

  • jdk.bat 6|7|8

Reference

  • This bat file is not written by me! I took it from stackoverflow and I found it really useful to share it here!
  • Thanks to Chris