They tried to do it with Java but Sun wrote a really good contract and filed and won a multi-million dollar lawsuit against them for trying to fragment the platform.[1]
There are two entirely different narratives there when you view Java. Microsoft's implementation was a better, faster, and fully compliant JVM with what Sun was making. An application written for Sun's implementation ran on Microsoft's. This was before Swing, and Microsoft added extensions that allowed you to write Windows Forms applications using this new and upcoming language. Windows Forms applications would not run on Sun's implementation.
Sun argued that Microsoft was intentionally breaking compatibility, but the other side was that Microsoft was actually exposing more developers to the fledgling language and providing a GUI that felt native to the rest of the OS. When Swing finally came out, it felt like you were running under CDE. That made me avoid running or writing Java applications for years.
In a lot of ways, Android repeated the exact same thing. Dalvik applications won't run in the Oracle JVM.
They also tried to do this with Java, but people were alert.