This is how I solved in Gnome -
1 - create file /usr/share/applications/java.desktop
In it, paste the below. It may not be perfect, I just wrote this as I went -
Comment=Java Application Launcher
Exec=/usr/bin/java -jar %f
2 - In Files/Nautilus, right click a jar and click properties. On the ‘open with’ tab, click Reset at the bottom - I had to do this to get OpenJDK to then show up. Then select OpenJDK, and click Set as Default.