Java could do this always, as it's a compiled language (the important thing here is interactivity vs. compilation, not JVM vs. native).
So I'd say that Java can do "this" since recently (JDK 9 in 2017) via JShell (I wouldn't count BeanShell or Groovy), i.e. it always had the compiler part but added the interpreter.
Although its usage is still quite rare, whereas the blog post would suggest a different pattern.
As addendum, Java has had support for AOT since around 2000, the only caveat is that it has been a feature only available on third party commercial JDKs.
GCJ improved very slowly and around 2009 lost most of its developers with the release of OpenJDK.
For AOT there is this JEP: https://openjdk.java.net/jeps/295 and a different project: the GraalVM