oracle/graal · error · RuntimeException

specified by the system property is not readable

Error message

%s specified by the %s system property is not readable

What it means

HostedLibGraalClassLoader bootstraps the hosted libgraal classes from a module path given by the libgraal.module.path system property. parseModulePathEntry converts each entry to a Path and throws RuntimeException('%s specified by the %s system property is not readable') when Files.isReadable fails. The message names both the offending path and the property so the misconfiguration is immediately actionable.

Solutions

  1. Verify each entry exists and is readable: Files.isReadable(Path.of(entry)) before JVM launch.
  2. Fix the property value: correct absolute paths, proper path-separator (; vs :), and no stray quotes/spaces.
  3. Grant read permission (chmod/chmod +r, or adjust the service user's access) on the module file/directory.
  4. Point libgraal.module.path at the modules shipped with your installed GraalVM distribution.

Example fix

# before
java -Dlibgraal.module.path=/opt/graalvm/libgraal:/typo/missing ...
# after (verify first)
ls /opt/graalvm/libgraal && java -Dlibgraal.module.path=/opt/graalvm/libgraal ...
Defensive patterns

Strategy: validation

Validate before calling

// Pre-flight check before JVM launch (or in a launcher script)
for (String entry : System.getProperty("libgraal.module.path", "").split(File.pathSeparator)) {
    if (!entry.isEmpty() && !Files.isReadable(Path.of(entry))) {
        throw new RuntimeException("fix path: " + entry);
    }
}

Prevention

When it happens

Trigger: Starting with -Dlibgraal.module.path=<entries> where an entry is a non-existent file/directory, a path with no read permission, or a typo'd/garbled path (bad quoting, wrong separator).

Common situations: Deploying to an environment where the libgraal module dir moved or has restrictive permissions; CI copying configs with stale absolute paths; shell quoting issues on Windows/Unix separators.

Related errors


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

Appendix: source

Thrown at compiler/src/jdk.graal.compiler.libgraal.loader/src/jdk/graal/compiler/libgraal/loader/HostedLibGraalClassLoader.java:200

                    "jdk.graal.compiler.options",
                    "jdk.graal.compiler.management",
                    "jdk.graal.compiler.libgraal",
                    "org.graalvm.truffle.compiler",
                    "com.oracle.graal.graal_enterprise")));

    static {
        ClassLoader.registerAsParallelCapable();
    }

    /**
     * Converts the module path entry {@code s} to a {@link Path}.
     *
     * @throws RuntimeException if {@code s} does not denote a readable path
     */
    Path parseModulePathEntry(String s) {
        Path path = Path.of(s);
        if (!Files.isReadable(path)) {
            throw new RuntimeException("%s specified by the %s system property is not readable".formatted(path, LIBGRAAL_MODULE_PATH_PROPERTY_NAME));
        }
        return path;
    }

    @SuppressWarnings("unused")
    public HostedLibGraalClassLoader() {
        // This loader delegates to the class loader that loaded its own class.
        super("LibGraalClassLoader", HostedLibGraalClassLoader.class.getClassLoader());

        try {
            /*
             * Access to jdk.internal.jimage classes is needed by this Classloader implementation.
             */
            var javaBaseModule = Object.class.getModule();
            Modules.addExports(javaBaseModule, "jdk.internal.jimage", HostedLibGraalClassLoader.class.getModule());

            /*
             * The classes that will get loaded by this loader require access to several internal

View on GitHub (pinned to a66e9ccd1d)