30

Eclipse を起動し、このエラーが発生しました。どうすれば修正できますか?

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:\Documents and Settings\Wizard'. 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.

追加情報が必要な場合はお知らせください。提供いたします。

4

6 に答える 6

27

他の回答では、Git を使用しない場合、この警告と「EGit を検出できませんでした」という警告を完全に無視できるとは考えていません。

しかし、私は知っています...強迫観念は無視することはできません.とにかくそれを修正する必要がありますよね?

次に進みます:

  1. 「ウィンドウ --> 設定」メニューに移動します
  2. 展開: 「チーム --> Git --> 確認と警告」
  3. 「ホームディレクトリ」と「Gitプレフィックス」ボックスのチェックを外します
  4. Ok
  5. ワークスペース ログで、古い警告を削除します (赤い十字アイコン)。
  6. エクリプスを再起動する
  7. あなたの心に広がる平和を感じてください... :)
于 2015-03-20T13:34:58.243 に答える
18

システムで JAVA_HOME 変数を設定する必要があります。オペレーティング システムによっては、「環境変数の設定方法」を確認できます。その時点から、環境変数を設定する必要があります

変数名: JAVA_HOME 値: bin フォルダーまでの Java のパス

  1. Windows 7 では、スタート メニューで「環境」と入力します。
  2. 「アカウントの環境変数を編集する」を選択します
  3. 「新規」ボタンをクリックします。
  4. 名前欄に「HOME」と入力
  5. 値フィールドに「%USERPROFILE%」またはその他のパスを入力します。
  6. [OK] をクリックし、もう一度 [OK] をクリックします。これで、Windows にホーム ディレクトリが追加されました。
于 2013-10-04T07:00:52.877 に答える
7

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

于 2014-07-13T12:45:00.343 に答える
0

環境変数を設定する必要も、システムやユーザーのためHOMEに設定する必要もありません。JAVA_HOME必要なデータは、小さなスクリプトで eclipse または Git または EGit に簡単に与えることができますHOME。これらのプログラムがアクセスできる任意のディレクトリを選択できます。たとえば、ディレクトリはN:\somewhere\eclipse\HOME. - 実行可能な Eclipse ファイルの場所を調べます。- デスクトップまたは任意のディレクトリにあるエディターまたはお気に入りのテキスト エディター アプリを使用して、新しいテキスト ファイルを開きます。- 次の 3 行のテキストを書きます

SET HOME=N:\somewhere\eclipse\HOME
start "Run Eclipse" "F:\ProgramFiles\eclipse\java-2019-03\eclipse\eclipse.exe"
EXIT
  • N:\somewhere\eclipse\HOMEこれは、選択した既存のディレクトリの単なる例です。「Run Eclipse」は、スクリプト ウィンドウのタイトルの例です。「F:\ProgramFiles\eclipse\java-2019-03\eclipse\eclipse.exe」はexclipeアプリを起動する例です。
  • テキストファイルを「RunEclipse.cmd」として保存します
  • RunEclipse.cmd を実行すると、このスクリプトだけに HOME 環境変数が設定されます。eclipse.exe はスクリプト環境から取得でき、エラーは発生しなくなりました。
于 2019-04-07T09:17:16.683 に答える