I'm trying to figure out what the bare minimum files are in GraalVM JDK 25 to run any Java 25 application. The full GraalVM JDK currently exceeds 1GB, which includes a 290MB onnxruntime.PDB file. Can anyone recommend the vital files I need to make a Java program run, excluding anything related to a development environment or features like compiling or debugging?
3 Answers
You really shouldn't go about stripping GraalVM manually since it’s not meant for that. Instead, I recommend using the `jlink` tool. Start by analyzing your app modules with `jdeps`, and then build a custom runtime image that includes just what you need. This usually reduces the size significantly compared to the full GraalVM package, which comes with a lot of extras like native-image and ONNX that aren’t necessary for running Java bytecode.
The Graal JIT compiler is found in `lib/libjvmcicompiler.so`, which is about 44MB. Everything else is optional and aligns more with the typical JDK/JRE distribution.
This is exactly what I was searching for, thanks!
Hey, just a side note, the `jlink` tool will be your best bet for creating a minimal runtime image for your program. Also, that large PDB file seems to be an oversight; we appreciate you bringing it up!

I agree, but my situation requires it; with some basic stripping, I got it down from 1.1GB to under 250MB.