I'm trying to find out what the least amount of files I need from GraalVM JDK 25 to successfully run any Java 25 program. The current size of the GraalVM JDK is over 1GB, including a large 290MB onnxruntime.PDB file. I'm looking for advice on the essential files needed for just execution, ignoring any development or debugging tools.
3 Answers
The Graal JIT compiler is found in `lib/libjvmcicompiler.so` and is about 44MB in size. The rest of the components are optional, similar to a typical JDK or JRE distribution.
You definitely don’t want to try stripping down GraalVM manually, as that could lead to issues. Instead, use the `jlink` tool to create a custom runtime image based on your application’s modules. You can analyze your app with `jdeps` first. This approach usually reduces the size significantly compared to the full GraalVM, which has many extras like native-image and polyglot support that aren't needed for just running Java bytecode.
Totally agree! I've managed to trim it down from over 1.1GB to under 250MB with some basic strikes.
Can someone explain what the differences are between a JDK, a JRE, and a JVM? Also, what exactly is GraalVM used for?
Yes, I can clarify that! Do you want to know about specific functionalities they offer? And by the way, if there's a JRE version for Windows x64 from GraalVM Java 25 available, I’d love to see it!

This info is exactly what I needed, thanks a lot!