oracle/graal · error · AssertionError
The java.home system property is not set
Error message
The java.home system property is not set
What it means
Error "The java.home system property is not set" thrown in oracle/graal.
Source
Thrown at sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java:183
final Path home;
if (ImageInfo.inImageRuntimeCode()) {
final String graalvmHomeValue = System.getProperty("org.graalvm.home");
if (graalvmHomeValue != null) {
verbose("GraalVM home already set to: ", graalvmHomeValue);
home = Paths.get(graalvmHomeValue);
} else {
home = getGraalVmHomeNative();
verbose("Found GraalVM home: ", home);
if (home == null) {
return null;
}
}
return home;
} else {
final String javaHomeProperty = System.getProperty("java.home");
if (javaHomeProperty == null) {
throw new AssertionError("The java.home system property is not set");
}
final Path javaHome = Paths.get(javaHomeProperty);
if (!Files.exists(javaHome)) {
throw new AssertionError("Java home is not reachable.");
}
if (Files.exists(javaHome.resolve(Paths.get("lib", "modules")))) {
home = javaHome;
} else {
throw new AssertionError("Missing jimage in java.home: " + javaHome);
}
verbose("GraalVM home found by java.home property as: ", home);
return home;
}
}
View on GitHub (pinned to a66e9ccd1d)
Solutions
- Fix the condition reported by the error: The java.home system property is not set
- Check the throwing call site and ensure its documented preconditions (argument values, types, environment, or configuration) are satisfied before the call.
Example fix
Validate inputs and environment so that the failing condition does not occur: The java.home system property is not set
When it happens
Trigger: Thrown at sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java:183 when the library encounters an invalid state.
Common situations: Occurs when a caller violates the contract guarded by this check: The java.home system property is not set
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/a0a1d9b573882e9f.
Report an issue: GitHub.