It was successful for a while. Java applets were once fairly common. But then Flash largely replaced them, and then Html5 killed them flat.

A very limited "anywhere", but yes.

For that use case, was it active content, was it shipping intermediate representation, was it a sandbox? To all three: yes, very poorly.