And I don't buy that JVM, Flash, Silverlight, or any of the others could have been able to provide something similar (or better) that the web world. The biggest benefits of the web ecosystem currently are NPM and the "runs literally everywhere". The JVM/Java ecosystem is closest in that area, but that story gets really ugly when it comes to cross-platform UIs and startup time. And while they could have created their own system that installs/runs instantly without needing complex permissions, without needing to "install" at all, automatically cleans itself up, and can be accessed from anywhere in the world by a simple string, they didn't. Flash/Silverlight tried, but in the end they ended up just being worse versions of the js world (remember the damn loading bar that every single flash application needed for some reason?)
Like it or not, the web nailed all the right things, and it became pretty much the most used platform over the course of a few years. Not by accident, but because it did something right.
Either you unite all the platforms to make them one, which I'd rather not for diversity's sake, or you accept the fact that there has to be something out there that supports all of them, which isn't going to be an easy feat no matter what, and web is already doing quite fine.
By the way, I surely also hate CSS, and JS to an extent, but my experience programming UI in other platforms haven't been exactly pain-free either. The hate might have been a bit overblown. The nature of computer programming in its current form just simply fits badly with UI design. That's the fact.
My point was that Java, Flash or Silverlight could have done the same if you replace the browser with a similar platform in those ecosystems. JS is getting to leverage the powerful browser platform with native integration, while the others were mere plugins.
Would be very different if the browser was a JVM based platform.
JRE is difficult to manage and maintain, and security wise is a nightmare compared to javascript (would you run random .jar's from any website?) Adobe had multiple attempts at a "browser-like" runtime for flash, none of which got all that far (although the Adobe Air system has done pretty damn well, and is actually still alive and kicking).
It could be any number of reasons why web won over the alternatives, but I just don't think that it won because of a mistake, or a fluke. The web was doing something better than the others, and while I can't exactly pinpoint it (hell, it probably isn't any one thing), it is winning.
And i'm in no way saying it's perfect. There are a ton of things i'd change about it if given the chance. But you can't just act like it's a horrible platform and that we should start over with something better (like many commenters in this thread and across the internet in general are saying).