{"record":{"id":"4f4c1d5a16b33696","repo":"oracle/graal","slug":"s-specified-by-the-s-system-property-is-not-read","errorCode":null,"errorMessage":"%s specified by the %s system property is not readable","messagePattern":"(.+?) specified by the (.+?) system property is not readable","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"compiler/src/jdk.graal.compiler.libgraal.loader/src/jdk/graal/compiler/libgraal/loader/HostedLibGraalClassLoader.java","lineNumber":200,"sourceCode":"                    \"jdk.graal.compiler.options\",\n                    \"jdk.graal.compiler.management\",\n                    \"jdk.graal.compiler.libgraal\",\n                    \"org.graalvm.truffle.compiler\",\n                    \"com.oracle.graal.graal_enterprise\")));\n\n    static {\n        ClassLoader.registerAsParallelCapable();\n    }\n\n    /**\n     * Converts the module path entry {@code s} to a {@link Path}.\n     *\n     * @throws RuntimeException if {@code s} does not denote a readable path\n     */\n    Path parseModulePathEntry(String s) {\n        Path path = Path.of(s);\n        if (!Files.isReadable(path)) {\n            throw new RuntimeException(\"%s specified by the %s system property is not readable\".formatted(path, LIBGRAAL_MODULE_PATH_PROPERTY_NAME));\n        }\n        return path;\n    }\n\n    @SuppressWarnings(\"unused\")\n    public HostedLibGraalClassLoader() {\n        // This loader delegates to the class loader that loaded its own class.\n        super(\"LibGraalClassLoader\", HostedLibGraalClassLoader.class.getClassLoader());\n\n        try {\n            /*\n             * Access to jdk.internal.jimage classes is needed by this Classloader implementation.\n             */\n            var javaBaseModule = Object.class.getModule();\n            Modules.addExports(javaBaseModule, \"jdk.internal.jimage\", HostedLibGraalClassLoader.class.getModule());\n\n            /*\n             * The classes that will get loaded by this loader require access to several internal","sourceCodeStart":182,"sourceCodeEnd":218,"githubUrl":"https://github.com/oracle/graal/blob/a66e9ccd1d7bf2552883939aa0788dfd0e294aab/compiler/src/jdk.graal.compiler.libgraal.loader/src/jdk/graal/compiler/libgraal/loader/HostedLibGraalClassLoader.java#L182-L218","documentation":"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.","triggerScenarios":"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).","commonSituations":"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.","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."],"exampleFix":"# before\njava -Dlibgraal.module.path=/opt/graalvm/libgraal:/typo/missing ...\n# after (verify first)\nls /opt/graalvm/libgraal && java -Dlibgraal.module.path=/opt/graalvm/libgraal ...","handlingStrategy":"validation","validationCode":"// Pre-flight check before JVM launch (or in a launcher script)\nfor (String entry : System.getProperty(\"libgraal.module.path\", \"\").split(File.pathSeparator)) {\n    if (!entry.isEmpty() && !Files.isReadable(Path.of(entry))) {\n        throw new RuntimeException(\"fix path: \" + entry);\n    }\n}","typeGuard":null,"tryCatchPattern":null,"preventionTips":["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"],"tags":["libgraal","configuration","classpath","system-property","permissions"],"backgroundTag":null,"analyzedSha":"a66e9ccd1d7bf2552883939aa0788dfd0e294aab","analyzedAt":"2026-08-14T13:58:47.161Z","schemaVersion":2},"datasetVersion":"2026-08-15T22:17:37.221Z"}