Through IE, Microsoft controlled what you could run in the browser and they refused to upgrade the embedded JVM. Java Applets started becoming popular but then they stagnated.
Microsoft control was broken when Google decided create Chrome. Chrome is what allowed javascript to flourish.
I think that is glossing over some important details. Sun sued Microsoft repeatedly, and eventually stopped licensing Java to Microsoft. "Upgrading the embedded JVM" was not a user-friendly mandate... think of how annoying "upgrade" or "new version available" notices are today... now consider the same over a 14.4k modem. And finally, most Java applets sucked. Very few were "popular". They looked weird, non-native, had unfamiliar icons and menus, and were often slow.
Through IE, Microsoft controlled what you could run in the browser and they refused to upgrade the embedded JVM. Java Applets started becoming popular but then they stagnated.
Microsoft control was broken when Google decided create Chrome. Chrome is what allowed javascript to flourish.