ElasticSearch and Java environment variable

前端 未结 10 1078
抹茶落季
抹茶落季 2020-12-28 12:38

For Windows 7, I\'ve installed JDK in both 32 and 64 bit versions. The versions are 8, update 20 for all four installations. http://www.oracle.com/technetwork/java/javase/d

10条回答
  •  野趣味
    野趣味 (楼主)
    2020-12-28 13:27

    See , you just need to do below: (don't delete any environment variable already set)

    • Step 1: Edit elasticsearch-service.bat located in \bin
    • Step 2: Add below line at the beginning (below @echo) SET JAVA_HOME=C:\Program Files\Java\jdk1.8.0_162 (or your Java path)
    • Step 3: locate %%JAVA_HOME%% in the same file and replace it with %JAVA_HOME%
    • Step 4: then from cmd in bin folder run: elasticsearch-service.bat install
    • Step 5: That's it, simply run elasticsearch-service now from cmd and it will run.

提交回复
热议问题