The type of "reimplementing" Google is alleged to have done has always been illegal unless the license terms of the software said otherwise. Had Google done a clean room reimplementation then they would have been in the clear, but instead they allegedly lifted code directly from Oracle's (copyrighted) APIs and used it without a license.
Many (most/all?) of the other languages mentioned have highly permissive licenses that expressly allow the sort of thing Google did. In many cases, the copyrighted portion of the language is little more than a set of standards to be followed, with the actual method for following those standards left up to whoever wants to write a compiler/interpreter for it.. Java has a much more restrictive license and always has, even when it was owned by Sun. Sun just didn't bother going after these sorts of suits. Of course, they didn't have the most powerful Internet company in the world making billions of dollars off a reimplementation of their code, either, at least not until they were already hemmorhaging money too fast to do anything about it.