The problem was resolved by running:
ftype jarfile="C:\Program Files\Eclipse Adoptium\jdk-21.0.7.6-hotspot\bin\javaw.exe" -jar "%1" %
My application was compiled in newer version of java, ftype jarfile was returning version 1.8
---
Run CMD with Administrator privileges