https://www.graalvm.org/sdk/javadoc/org/graalvm/polyglot/Con...
Here are a couple of demos:
https://github.com/graalvm/graalvm-demos
I said "currently", because you currently have to use the host Java, that is the Java on top of which all other languages are implemented. The GraalVM team is working on Project Espresso, a Java written in Truffle. That will make polyglot programming with Java much more consistent with the rest of the languages. Project Espresso isn't public yet, but here's the latest update from the team working on it:
https://github.com/oracle/graal/issues/1656#issuecomment-664...
What I found interesting with this approach is that it allows you to do server side rendering without needing a separate server and without needing any third party dependencies aside from GraalVM itself.
0. https://github.com/JackBister/javalin-preact-archetype
1. https://github.com/JackBister/javalin-preact-archetype/blob/...
2. https://github.com/JackBister/javalin-preact-archetype/blob/...