There's also binfmt support, which can check a supposedly executable file against some magic and auto-launch an interpreter (like wine or java or dosemu). I looked into it for something once but in my case the magic wasn't good enough.
https://www.kernel.org/doc/html/latest/admin-guide/binfmt-mi...