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

前端 未结 6 1700
无人及你
无人及你 2020-12-05 04:45

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         


        
相关标签:
6条回答
  • 2020-12-05 05:18

    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... :)
    0 讨论(0)
  • 2020-12-05 05:21

    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)

    0 讨论(0)
  • 2020-12-05 05:22

    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
    
    • Here 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.
    • save the text file as "RunEclipse.cmd"
    • By executing RunEclipse.cmd you set the HOME environment variable only for this script. eclipse.exe can get it from the script environment and the Error does not occur anymore.
    0 讨论(0)
  • 2020-12-05 05:27

    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

    0 讨论(0)
  • 2020-12-05 05:31

    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:

    1. type "environment" at the start menu.
    2. Select "Edit environment variables for your account".
    3. Under "User Variables", 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.

    File > Exit, then restart the application.

    0 讨论(0)
  • 2020-12-05 05:34

    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.
    0 讨论(0)
提交回复
热议问题