What are the essential files needed to run a Java 25 program with GraalVM JDK 25?

0
2
Asked By CuriousCoder88 On

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

Answered By TechSavvyJoe On

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.

MicroManager42 -

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

Answered By JavaNinja22 On

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.

LookingForDetails11 -

This is exactly what I was searching for, thanks!

Answered By GraalGuru On

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!

Related Questions

LEAVE A REPLY

Please enter your comment!
Please enter your name here

This site uses Akismet to reduce spam. Learn how your comment data is processed.