Java was greatly disadvantaged simply because it was complicated to download and install for common users.
Potential users would be offered multiple versions of the Java package, including SDK's and so on. That would scare off most users who just wanted to quickly view a simple applet.
Java has fixed this and now java.com has a one-click plugin download. Flash had this from the start, and I wouldn't be surprised it contributed for part of it's success.