"Java" in 1996 isn't what Java is today. In 1996 Suns focus was providing a runtime for executing code anywhere on the network, on any machine. That's why security managers, class loaders, applets, rmi, and jndi were baked in from the beginning. That future didn't pan out; no one wanted to run other peoples code. So J2EE was the pivot to the Enterprise and server apps. That's what we ended up with.
In a way, Gates may have been imagining or extrapolating the "run code anywhere" idea to the cloud services of today, which we've seen is a bit of a threat to proprietary operating systems. Well, more than a bit.