The JVM does this pretty well for Minecraft. I doubt Minecraft would support Linux, the BSDs, etc without it. Bedrock edition (the not-JVM version which supports Windows and consoles/phones) doesn't even support MacOS even though it obviously could.
If Minecraft were a Microsoft product from the start, they probably wouldn't have made the Java version compatible with Mac or Linux (even though it uses JVM, there are some natives included), or wouldn't have made a Java version to begin with.
Also it’s pretty ironic that Microsoft, who wants to convince the entire world that c#/netcore is the next multi-os platform isn’t capable of delivering anything else than Minecraft Java on Linux.
It’s a shame that I can’t play with my son from my Linux PC since he plays on switch (so the c#/bedrock edition)
If it were, targeting all platforms would have been fairly easy (assuming it would still rely on OpenGL), sometimes just specifying RID e.g. `linux-arm64`.
They could target Linux fine with their C++ code, they actually have secret builds for Linux for Marketplace creators (they have been leaked occasionally) but they don’t allow the general public to use them
There is an unofficial Linux launcher that can run the Android build
No it doesn’t. It’s a UWP app with DRMs everywhere.
Although there is an unofficial Linux launcher capable of running Bedrock natively using the embedded machine code in the Android version but it requires to buy the game one more time from the Google play store.