I download the java from the oracle website, the downloaded file name is "jdk-7u79-windows-i586" and I changed variable value to "C:\Program Files\Java\jdk1.7.0_79" so the android studio started without any problem. Downloading Java 17 on Windows 10 / Windows 11. Go to the official Oracle website here, under resources then software downloads. The next page opens which shows various downloads available. Click on Java. Click on Java SE to go to its download page. Next, click Windows then select the one you want. I chose the setup direct. To create a log file describing the installation, append /L C:\ path \setup.log to the install command and scroll to the end of the log file to verify. The following is an example of creating a log file: msiexec.exe /i installer.msi /L C:\ path \setup.log . In this example, the log is written to the C:\path\setup.log file. In the Windows Search menu, search for "Edit the system environment variables". This will open up a "System Properties" dialog. Click on "Environment Variables" button. This will open a "Environment Variables" dialog. You can create new variables here, it can be either User or System. Click "New". Enter ANDROID_SDK_ROOT for the name. To add/update system environment variables, you must use the -m switch and open the command prompt using Administrator privilege: Click Start, type cmd. When the cmd.exe icon appears, right click and select Run as administrator. To add/update system environment variables: setx -m JAVA_HOME "C:\Program Files\Java\jdk1.8.0" setx -m PATH "%PATH Create a new .bat file to set the JAVA_HOME with the following script: @echo off echo Setting JAVA_HOME setx /m JAVA_HOME "C:\Program Files\Java\jdk1.8.0_261 echo Display java version java -version Run the .bat as admin, and it's done, we are using the OracleJDK. Your command is correct for a windows 10 machine. And the result tells us, that this variable is not set. You can look for the settings for the environment variables in your start menu. You'll see settings for other variables like Path, TEMP and so on. There you can add JAVA_HOME (here without %). The solution to this problem was setting both a user Path variable and a new system variable "JAVA_HOME" specifically to the address of the bin folder of my Java 11 installation. In my case the path looked like this: C:\Program Files\AdoptOpenJDK\jdk-11.0.8.10-hotspot\bin App Vay Tiền.

how to set java 11 path in windows 10