Started Eclipse and got this error. How do I fix it?
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:
This is because JEE package is lacking the Platform SDK. (there is "Eclipse Platform Plug-in Developer Resources" in Eclipse IDE for Eclipse Committers(former Eclipse Standard), but not in Eclipse IDE for Java EE Developers.) You can solve this bug by installing it manually from "The Eclipse Project Updates" site. (Help->Install New Software->choose "The Eclipse Project Updates"->uncheck "Group items by category"->select "Eclipse Platform Plug-in Developer Resources")
(for EGit warnings, they are just warnings and have no relation to this problem)
There is no need to set an environment variable HOME
or JAVA_HOME
for the system or for any user. The required data can easily be given to eclipse or Git or EGit in a small script:
- Use your brain to make out where the HOME
for ecilpse or Git or EGit should be. You
can choose any directory accessible for these programs.
For example the directory is N:\somewhere\eclipse\HOME
.
- Examine the location of the executable eclipse file.
- Open a new text file with the Editor or with your favourite text editor app
on your desktop or in any directory you like.
- Write the following text of 3 lines
SET HOME=N:\somewhere\eclipse\HOME
start "Run Eclipse" "F:\ProgramFiles\eclipse\java-2019-03\eclipse\eclipse.exe"
EXIT
N:\somewhere\eclipse\HOME
is just an exmaple for any existing directory
you choose.
"Run Eclipse" is an example for the title of the script window.
"F:\ProgramFiles\eclipse\java-2019-03\eclipse\eclipse.exe" is an example for
the exclipe app to start.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
You should study the official documentation
Setting up the Home Directory on Windows
Add the environment variable HOME to your environment variables.
In Windows 7:
File > Exit, then restart the application.
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