I am trying to install android sdk through command line tools, in most of the tutorials it says that I should run android.bat from tools folder but cmd opens and then closes after a second or two, so I tried with the sdkmanager.bat from tools\bin\sdkmanager
.bat but the same happens.
I googled and found some information so I tried running it from cmd, android.bat is deprecated it says, but when running sdkmanager.bat or avdmanager.bat it gives me an error: JAVA_HOME
is not set
Here is the screenshot:
I tried following the steps as in: How to set java_home on Windows 7?
But after I did it and tried running it again in cmd, my problem is now this: