I was involved with Java applets when Java was in beta and one of the most annoying things was that JDK 1.0 did not come with serialization.
I would build applets that displayed content generated on the server and serialization-deserialization code could be 2/3 of the program. Most people had a slow net back then, so the download performance was a big deal.
JDK 1.1 put serialization in right away, but Netscape had already introduced it's own incompatible serializer, and there were delays in getting JDK 1.1, plus people didn't like Java serialization -- practically there was a year or two where you couldn't use it.
Applets had enough teething pains that people quickly came to the conclusion that they weren't worth the trouble, then Flash came along which came closer to what people wanted at the time.
I'd really like to see Flash reborn on WASM. WASM is a standard, so there will be no problems known to software produced and distributed by a private business (Macromedia/Adobe), problems like closed format, resources access control etc.
WASM + Canvas or WASM + OpenGL should give a significant part of that... but what made flash really special was the tooling around it. I wouldn't be surprised to see Adobe make some strides there, but the output may be less than optimal.
Timing, probably. Java was too slow in downloading and running on the commodity networks and hardware available at the time. Now that both of those are fast enough, we're seeing another implementation of the same idea.
Java applets came about in the days of 486s. They had huge startup time, were usually in a tiny little window, and everyone was starting from scratch with few libraries and drawing primitives. There was no webgl or compiling of existing UI programs into webasm with emscripten.