oracle/graal · error · AssertionError

Java home is not reachable.

Error message

Java home is not reachable.

What it means

Error "Java home is not reachable." thrown in oracle/graal.

Source

Thrown at sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java:188

                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;
        }
    }

    @Override
    public String getVersion() {
        String res = version;
        if (res == null) {
            if (GRAALVM_VERSION != null) {

View on GitHub (pinned to a66e9ccd1d)

Solutions

  1. Fix the condition reported by the error: Java home is not reachable.
  2. 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: Java home is not reachable.

When it happens

Trigger: Thrown at sdk/src/org.graalvm.home/src/org/graalvm/home/impl/DefaultHomeFinder.java:188 when the library encounters an invalid state.

Common situations: Occurs when a caller violates the contract guarded by this check: Java home is not reachable.


AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14). Data as JSON: /api/errors/ba0b3989d8c2bb81. Report an issue: GitHub.