Java got such a bad a reputation when it came out for slowness. And it was rightly deserved. The VM took forever to start up, especially on a consumer machine. Download speeds were still too slow. Performance was just terrible from start to finish.
They kept saying "it runs fast" which completely missed the point. The GUI toolkit was painfully slow, as was the JVM start-up. If they'd compromised on run-time performance in exchange for fast start-up and they'd re-thought the terrible GUI, it could have worked.
To be fair, executing today's Javascript web apps on that hardware would be much worse.
That's not true. GMail was always JS heavy and run fine back in IE 6 and Firebird 0.7 (now Firefox) in 2004/05.
Where as the Java 1.4 consumed too much memory and every now and then a lot of CPU cycles for its garbage collection cycle. 512MB RAM memory was the minimum for Java VM to execute a single Java app and consuming almost all memory resources.
Java could have won the web-app war, with a little more foresight. But a terrible GUI framework, terrible updater, terrible deployment, etc. killed it.
They knew exactly what they needed to make back when the idea of web-apps was still nascent - you can see the scaffolds laid in the history of Java. A zero-installation platform for cross-platform GUI apps.
But they just made so many painful errors that their platform was unusable.