@bgmadclown is correct. “keytool” is a program in the Java JDK binary folder. The path is something like:
C:\Program Files (x86)\Java\jdk1.8.40\bin\keytool.exe
But the path changes with each minor update to Java. You have to run the program either by changing directory into that folder and typing: keytool and the rest of the command but . . .
The default command expects to output the keystore in the folder where you typed the command. The folder where keytool.exe lives is not writable, so you have to include some path as part of the output file name to where to write the file to.
cd C:\Program Files (x86)\Java\jdk1.8.40\bin
keytool -genkey -v -keystore %HOMEPATH%\mykeystore.keystore -alias aliasname -keyalg RSA -validity 999999
or something like that, you have to change the path to be the right place on the cd command and you may want to output your keystore someplace other that %HOMEPATH%. You probably want to name the file something other than “mykeystore” and you want an aliasname that is something other than aliasname.
Rob