oracle/graal · error · RuntimeException
%s specified by the %s 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.
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 internalView on GitHub (pinned to a66e9ccd1d)
Solutions
- Verify each entry exists and is readable: Files.isReadable(Path.of(entry)) before JVM launch.
- Fix the property value: correct absolute paths, proper path-separator (; vs :), and no stray quotes/spaces.
- Grant read permission (chmod/chmod +r, or adjust the service user's access) on the module file/directory.
- 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
- Validate -Dlibgraal.module.path entries with Files.isReadable before startup
- Use paths from the installed GraalVM distribution
- Fix permissions for the service user running the JVM
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
- Use of %s is only supported in jargraal
- Given URI '%s' cannot be expressed as URL.
- Could not find option %s
- Class not found for polyglot type conversion handler: {}
- nargs not allowed
AI-assisted analysis of oracle/graal@a66e9ccd1d (2026-08-14).
Data as JSON: /api/errors/4f4c1d5a16b33696.
Report an issue: GitHub.