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

时间:2016-07-11 20:11:50

标签: java

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

2 个答案:

答案 0 :(得分:2)

这是我案例中的解决方案:

变量名称:JAVA_HOME

变量值:C:\ Program~1 \ Java \ jdk1.8.0_91 \ bin

变量名称:HOME

变量值:%USERPROFILE%

没有更多错误

答案 1 :(得分:0)

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.