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
If elasticsearch version is 7.5 or higher, you find elasticsearch-7.X.Y\bin directory and then edit the elasticsearch-env.bat as the following:
if defined JAVA_HOME (
set JAVA="%WRITE_ELASTICSEARCH_JAVA_PATH%\bin\java.exe" //write java custom path. Edit only this line
set JAVA_TYPE=JAVA_HOME
) else (
set JAVA="%ES_HOME%\jdk\bin\java.exe"
set JAVA_HOME="%ES_HOME%\jdk"
set JAVA_TYPE=bundled jdk
)
You can customize the java path like that for elasticsearch.