简体   繁体   中英

How do i properly set my JAVA HOME environment variable for Spring Tool Suite?

I keep getting the following error message when opening Spring Tool Suite with a Roo project open.

With previous projects i did not have this problem. So, it might have something to do with Roo ?

Message: Warning: The environment variable HOME is not set. The following directory will be used to store the Git user global configuration and to define the default location to store repositories: 'C:\\Users\\Media Markt Apeldoor'. If this is not correct please set the HOME environment variable and restart Eclipse. Otherwise Git for Windows and EGit might behave differently since they see different configuration options. This warning can be switched off on the Team > Git > Confirmations and Warnings preference page.

But my environment variable(both User and System) is set as follows, pointing to my JDK directory:

Variable name: JAVA_HOME Variable value: C:\\Program~1\\Java\\jdk1.8.0_91

and my JDK is here: C:\\Program Files\\Java\\jdk1.8.0_91

So, the "~1" should be fine in the value of the variable.

For setting the environment variable i followed this site to the letter: https://confluence.atlassian.com/doc/setting-the-java_home-variable-in-windows-8895.html

I have added this info to my question: When i look into the session data of this program Spring Tool Suite i see the following which confuses me know since i have a 64 bit -system.eclipse.buildId=3.8.0.201606301029-RELEASE-e46

java.version=1.8.0_91

java.vendor=Oracle Corporation

BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US

Framework arguments: -product org.springsource.sts.ide

Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.springsource.sts.ide

This is the solution in my case:

Variable name: JAVA_HOME

Variable value: C:\\Program~1\\Java\\jdk1.8.0_91\\bin

Variable name: HOME

Variable value: %USERPROFILE%

No more errors

I solved it by just changing the name to "HOME" instead of "JAVA_HOME"

Variable name: HOME Variable value: C:\\Program~1\\Java\\jdk1.8.0_91

Thank you Ulrich for helping out.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM