"Write once, run everywhere" is the web applications promise. Unfortunately we have a lot of work to do to make web applications comparable to native apps.
Too bad its still Java though :p (with many advances in sandboxing and security), but I guess Google/Android didn't really have much of an option back then and I'm honestly not sure what would be the better choice now.