docs/reference-manual/java-on-truffle/FAQ.md
Not quite: it implements the Java Virtual Machine running as a Truffle interpreter.
That means it can only run a Java program once it has been compiled to Java bytecode (classes, JAR files, and so on) with your favorite Java compiler (for example, javac) or a build tool (Maven, Gradle, and so on).
In the GraalVM family, this is similar to WebAssembly or the LLVM interpreter: while both can run C programs, they have to be compiled by a C compiler first.
Like other languages implemented with the Truffle framework, it can run both as a native executable or on the HotSpot JVM. Running on the HotSpot JVM is currently only possible on Linux x64. We plan to extend this capability to other platforms.
No, it doesn't, it works fine as a native executable.
Espresso does require a standard core Java library (the rt.jar library for Java 8 or the lib/modules file for Java 11+, as well as the associated native libraries: libjava, libnio, and so on).
Espresso is an implementation of the Java Virtual Machine. It is open source and is offered as free software under the GNU General Public License version two (GPLv2).
Yes, you can on Linux x64. Support for other platforms is still experimental.
Performance is currently 2-3x slower than the HotSpot JVM. It does not match the speed offered by GraalVM yet for sure, but having created a fully-working Espresso runtime, the development team is now focusing on making it as performant as the GraalVM JIT.
Yes, you can use GraalVM's Polyglot API to run Java bytecode in a separate context from the host Java VM.
You can even embed a Java 8 context in a Java 11, 17, or 21 application (using the option --java.JavaHome=/path/to/jdk8).
It is not possible to attach an agent to Espresso. For the time being, add -XX:+IgnoreUnrecognizedVMOptions to the VM options.