2

As far as I can tell my System JAVA_HOME Variables are set correctly, but echo %JAVA_HOME% returns a wrong path (it is for an old version of Java) even after I restarted windows.

Here are my environment settings

Another program also thinks JAVA_HOME is set to this wrong path.

I'm using Windows 10.

11
  • Change it to be relevant..? It is probably a System Environment Variable. Commented Dec 26, 2017 at 23:37
  • I did change it. Didn't I? Commented Dec 26, 2017 at 23:38
  • Restarting didn't work. Windows still thinks JAVA_HOME is set to ...\jre1.8.0_121 instead of C:\Program Files\Java\jdk-9.0.1 to which I set it in the Systemvariables Commented Dec 26, 2017 at 23:55
  • Is it still in the System Variables after a restart..? If so, that's odd. Something has to be setting it somehow. Commented Dec 26, 2017 at 23:58
  • 1
    Thank you very much user2864740 :) @the_storyteller Yes I restarted Windows Commented Dec 27, 2017 at 0:07

2 Answers 2

3

SOLUTION: I had a different local User Variable set for JAVA_HOME but I didn't see, and couldn't access it because I needed administration rights to view them. When I accessed through administration rights I only saw the variables for the Administrator User.

Sign up to request clarification or add additional context in comments.

Comments

-1

For when you have a corporate/job laptop which is kinda restricted for other users; I went into the Registry editor, went into every user in HKEY_USERS and checked / changed the paths there accordingly.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.