JavaScript seems to have shipped as LiveScript in September 1995, but https://en.m.wikipedia.org/wiki/JavaScript#Version_history also has March 1996 as date for the first version. Java seems to have been shown to the world in beta form in May 1995, with the first JDK available on January 23, 1996 (https://en.m.wikipedia.org/wiki/Java_version_history), so Java seems a tad older than JavaScript.
I think a few important 'features of WebAssembly', compared to Java are that WebAssembly is going to come out at a time when:
* machines are cheap and fast enough.
* bandwidth is cheap and plenty enough.
* the world knows you need open standards to conquer the world (or, cynically, that getting hold of data is the primary objective nowadays)