I changed the registry by creating .reg file and paste this bellow code. Should update the path of java.exe before running reg file.
[HKEY_CLASSES_ROOT\Applications\java.exe\shell\open\command]
@="\"C:\\Program Files\\Java\\jdk-22\\bin\\java.exe\" -jar \"%1\""