Falling back to java on path. This behavior is deprecated

windows启动elasticsearch报错:warning: Falling back to java on path. This behavior is deprecated. Specify JAVA_HOME

Cause: The machine has been installed on the windows java, but not configured environment variables JAVA_HOME

Because you can install multiple JDK and JVM on one computer, in order to avoid confusion, you can add the environment variable JAVA_HOME, specify a default JDK for use.

Use the echo command to check the environment variable JAVA_HOME

echo %JAVA_HOME%
E:\elasticsearch\bin>echo %JAVA_HOME%
%JAVA_HOME%

Solution:
The JAVA_HOME environment variable can be added to.

After setting environment variables, you need to restart the command line in order to take effect.

Guess you like

Origin www.cnblogs.com/sirdong/p/11627404.html