Eclipse project-wide error: Warning: The environment variable HOME is not set. The following directory will be used to store the Git

The other answers don't contemplate that if you don't use Git, then you can entirely ignore this warning, along with the "EGit could not detect" one.

But I know... obsessive minds can't just ignore... they NEED to fix it anyway, right?

Then proceed:

  1. Go to "Window --> Preferences" menu
  2. Expand: "Team --> Git --> Confirmations and warnings"
  3. Uncheck the "Home directory" and "Git prefix" boxes
  4. Ok
  5. In the Workspace log, delete the old warnings (red cross icon)
  6. Restart Eclipse
  7. Feel the peace spreading through your mind... :)

You need to set the JAVA_HOME variable in your system. Depends on your Operating system you can check for "How to set Environment variable?" and from that point you need to set environment variable

Variable Name : JAVA_HOME Value : Path of Java upto bin folder

  1. In Windows 7, type "environment" at the start menu
  2. Select "Edit environment variables for your account"
  3. Click the "New" button.
  4. Enter "HOME" in the name field
  5. Enter "%USERPROFILE%" or some other path in the value field.
  6. Click OK, and OK again. You have just added the Home directory on Windows.

This is a warning because the HOME environment is not defined, whereas EGit (plugin for Git) need it to know where to locate the Git configuration and repository. By default it will use the current user base directory but the risk is that if you have Git installed at a different location, EGit and Git may have different behaviors. If you don't use Git, just deactivate the warning as explained.

Here is the EGit user guide : https://wiki.eclipse.org/EGit/User_Guide#Setting_up_the_Home_Directory_on_Windows It explains that you have to set the HOME variable with the %USERPROFILE% as value.

You may check that too http://git-scm.com/book/en/Getting-Started-First-Time-Git-Setup and Changing .gitconfig location on Windows

Tags:

Eclipse

Git

Egit